And ( remember ) Dawud ( David ) and Sulaiman ( Solomon ) , when they gave judgement in the case of the field in which the sheep of certain people had pastured at night and We were witness to their judgement .