“Now therefore, in the sight of all Israel, the assembly of the LORD, and in the hearing of our God, be careful to seek out all the commandments of the LORD your God, that you may possess this good land, and leave it as an inheritance for your children after you forever. As for you, my son Solomon, know the God of your father, and serve Him with a loyal heart and with a willing mind; for the LORD searches all hearts and understands all the intent of the thoughts. If you seek Him, He will be found by you; but if you forsake Him, He will cast you off forever.”
Near the end of his life, David reminded Solomon of his responsibilities as the future king. This was not a private audience, since David also wanted the leaders of Israel to hear these instructions (1 Chronicles 28:1), which included details about building the temple. The leaders would play an important role in preparing for and helping build the temple (1 Chronicles 29:6).
David stressed a continuing theme of the Bible, that obedience to God’s law brings benefits. David encouraged Solomon to go beyond outward obedience to serve God wholeheartedly, since God searches our hearts and is pleased by those who seek Him with right motives.
For more about loving God wholeheartedly, see the article “The Great Commandment.”