1 Chronicles 28:6-10

ISV(i) 6 He told me, ‘I chose your son Solomon to be the one who will construct my Temple and my courts, because I have chosen him to be a son to me, and I will be a father to him. 7 I will establish his kingdom forever, assuming he remains strongly committed to carry out my commandments and ordinances, as he is doing today.’
8 Therefore, in the presence of all of Israel, the assembly of the LORD, and while our God is listening, observe and search through all of the commandments of the LORD your God, so that you may continue to possess this good land, leaving it for an inheritance forever to benefit your descendants who come after you.”
9 David Addresses Solomon Directly“Now as for you, my son Solomon, get to know the God of your father. Serve him with a sound heart and a devoted soul, because the LORD is searching every heart, every plan and thought. He will be found by you, assuming you are seeking him, but if you abandon him, he will abandon you forever. 10 So keep watching, because the LORD has chosen you to build the Temple of his sanctuary. So be strong, and get to work!”