We pick up this same thread again later in Solomon’s prayer of dedication:
“whatever prayer, whatever plea is made by any man or by all your people Israel, each knowing his own affliction and his own sorrow and stretching out his hands toward this house, then hear from heaven your dwelling place and forgive and render to each whose heart you know, according to all his ways, for you, you only, know the hearts of the children of mankind,” – 2 Chronicles 6.29-30
Here, Solomon reveals that God is not only acquainted with his father, King David’s, heart, but also the hearts of all men. Not only does God know the hearts of all mankind, but it is an exclusive knowledge which He alone possesses.
Although Solomon throws a curve-ball when he states, “for you, you only, know the hearts of the children of mankind” (2 Chronicles 6.29-30). This would imply that not even the man, himself, is capable of knowing his own heart. Certainly, we see this affirmed elsewhere in the Scriptures, “The heart is deceitful above all things, and desperately sick; who can understand it?” (Jeremiah 17.9). Of course, the implied answer to Jeremiah’s question is that no one can understand or discern his own heart. Man’s heart is deceitful. Man perpetually thinks more highly of himself than he ought. He constantly convinces himself that his actions are motivated by a more noble cause than is true. No, no one can truly discern his own heart, that is, except God and God alone, which is the reason that it can be said only of God’s Word: “For the word of God is living and active, sharper than any two-edged sword, piercing to the division of soul and of spirit, of joints and of marrow, and discerning the thoughts and intentions of the heart” (Hebrews 4.12). Only God and His Word can truly discern man’s heart.
So much is bound up in these disclosures of God’s omniscience, as it relates to the hearts of man. As a child of God, it can be such a source of encouragement to know that, despite the outcome, God knows the intentions of the heart when one is acting on behalf of another’s good. As far as the believer’s conscience is concerned, if the primary intention behind his actions is to love God and his neighbor, then God honors the believer’s intent even if the end-result is not as expected. (As in the case of King David’s desire to build the temple, God honored King David’s intent even though he was not given the opportunity to actually follow through with it.)