Almighty Allah revealed: And to David We gave Solomon. How excellent a slave! Verily, he was ever oft-returning in repentance (to Us)!
When there were displayed before him, in the afternoon, well trained horses of the highest breed (for jihad in Allah's cause). And he said: 'Alas! I did love the good (these horses) instead of remembering my Lord (in my Asr prayer)" till the time was over, and (the sun) had hidden in the veil (of night). Then he said: "Bring them (horses) back to me." Then he began to pass his hand over their legs and their necks till the end of the display.
And, indeed We did try Solomon and We placed on his throne Jasadan (a devil, so he lost his kingdom for a while) but he did return (to his throne and kingdom by the Grace of Allah and he did return) to Allah with obedience and in repentance. He said: 'My Lord.' Forgive me, and bestow upon me a kingdom such as shall not belong to any other after me: verily, You are the Bestower."
So, We subjected to him the wind, it blew gently to his order whither-so-ever he willed - and also the devils from the jinns (including) every kind of builder and diver, - and also others bound in fetters. (Saying of Allah to Solomon): 'This is Our gift, so spend you or withhold, no account will be asked." And verily, he enjoyed a near access to Us, and a good final return (Paradise). Surah 38: 30-40
Related Quran Ayaaths of this Hadith.
Surah 6 : Ayah 84 Surah 4 : Ayah 163 Surah 27 : Ayah 15 Surah 27 : Ayah 16 Surah 27 : Ayah 17 Surah 27 : Ayah 18 Surah 27 : Ayah 19"When a person dies, his works end, except for three: ongoing charity, knowledge that is benefited from, and a righteous child who prays for him."
Prophet Mohammed (PBUH)
"The best of what a man leaves behind are three: a righteous child who supplicates for him, ongoing charity the reward of which reaches him, and knowledge that is acted upon after him."
Sunan Ibn Mājah
"Every day two angels come down from Heaven and one of them says, 'O Allah! Compensate every person who spends in Your Cause,' and the other (angel) says, 'O Allah! Destroy every miser.'"
Sahih Bukhari