Ibn Shihab (may Allah have mercy on him) said: Two men brought a dispute to the Messenger of Allah (peace and blessings be upon him). One of them was weak in his arguments and could not make his case clear. The Prophet (peace and blessings be upon him) ruled in favour of the other, so the one with the weak argument said: Allah is sufficient for me, and He is the best Disposer of affairs. He (peace and blessings be upon him), moving his hand two or three times, said: "'Hasbiyallahu wa ni'mal-wakil' (Allah is sufficient for me, and He is the best Disposer of affairs). Seek your right until you are unable; when you are unable, then say: 'Hasbiyallahu wa ni'mal-wakil' (Allah is sufficient for me, and He is the best Disposer of affairs), for judgment between you is made on the basis of your arguments."
This is munqati' (its chain is broken).
Hadith Referenceالسنن الكبرى للبيهقي / كتاب الشهادات / 20724