The Appointment of Hazrat Sulaiman (as)

Verily Allah revealed to Dawud to appoint his legatee from his family. “Because I have destined that every legatee of a Prophet should be from his own family.” Dawud had few sons and one of them was the one whose mother was beloved to Dawud. Dawud went to his wife and told her that, “Allah has revealed that He is going to appoint my successor from my family.” She said, “Make my sons as the successor.” Dawud said, “I also want it.” But it was in the knowledge of Allah that Sulayman was to be the Successor. So Allah revealed to Dawud not to hurry in appointing his successor “until My Order comes.”
After a few days two people came to Dawud regarding the grape orchard and sheep for justice. Allah revealed to Dawud to collect his sons and when the litigants presented their case to them Sulayman asked, “O the owner of orchard, what time did the sheep enter your grove?” He replied, “At night.” Then he said to the owner of sheep, “I order you to compensate with the young ones of the sheep and its wool for one year to the owner of the grove.: Dawud said, “Why do you not order that all sheep be given to the grove owner? As the judges of The Israelites usually decree.” Sulayman said, “Trees were not uprooted, next year fruit can be cultivated from them. Only this year’s crop is destroyed. Therefore only for this year the young ones of the sheep should be given to the orchard owner.” Allah revealed to Dawud that whatever verdict Sulayman has given is correct. “Dawud whatever you wanted was different from what I wanted.” Then Dawud went to his wife and said, “Whatever I wanted was different from what Allah desired. Whatever Allah desires, it comes to pass and we are His subjects and His obedient ones.”