1 Chronicles 28:9 in the King James Version
And thou, Solomon my son, know thou the God of thy father, and serve him with a perfect heart and with a willing mind: for the LORD searcheth all hearts, and understandeth all the imaginations of the thoughts: if thou seek him, he will be found of thee; but if thou forsake him, he will cast thee off for ever.
Context
8 Now therefore, in the sight of all Israel, the LORD’s assembly, and in the audience of our God, observe and seek out all the commandments of the LORD your God, that you may possess this good land, and leave it for an inheritance to your children after you forever.
9 You, Solomon my son, know the God of your father, and serve him with a perfect heart and with a willing mind; for the LORD searches all hearts, and understands all the imaginations of the thoughts. If you seek him, he will be found by you; but if you forsake him, he will cast you off forever.
10 Take heed now, for the LORD has chosen you to build a house for the sanctuary. Be strong, and do it.”