وَدَاوٗدَ وَسُلَيْمٰنَ اِذْ يَحْكُمٰنِ فِى الْحَرْثِ اِذْ نَفَشَتْ فِيْهِ غَنَمُ الْقَوْمِۚ وَكُنَّا لِحُكْمِهِمْ شٰهِدِيْنَ ۖ ( الأنبياء: ٧٨ )
Wa Daawooda wa Sulaimaana iz yahkumaani fil harsi iz nafashat feehi ghanamul qawmi wa kunnaa lihukmihim shaahideen (al-ʾAnbiyāʾ 21:78)
And [mention] David and Solomon, when they judged concerning the field – when the sheep of a people overran it [at night], and We were witness to their judgement. (Al-Anbya  : 78)
1 Mufti Taqi Usmani
And (remember) Dawūd (David) and Sulaimān (Solomon), when they were adjudicating about the tillage in which the goats of other people wandered at night (and trampled it), and We were witness to their judgment.