
Jabir bin Abdullah (RA) said: The Prophet (SAW) used to teach us to seek Allah's Counsel in all matters, as he used to teach us a Surah from the Qur'an. He would say: When anyone of you has an important matter to decide, let him pray two Rak'ahs other than the obligatory prayer, and then say:
Allahumma inni astakhiruka bi`ilmika, wa astaqdiruka bi-qudratika, wa as'aluka min fadlika al-azim, fa'innaka taqdiru wala aqdiru, wa ta`lamu wa la a`lamu, wa anta `allamu-l-ghuyub.
Allahumma, in kunta ta`lamu anna hadhal-amra [------] khairun li fi dini wa ma`ashi wa `aqibati 'amri faqdurhu li wa yas-sirhu li thumma barik li fihi.
Wa in ta`lamu anna hadhal-amra sharrun li fi deeni wa ma`ashi wa 'aqibati 'amri fasrifhu `anni was-rifni `anhu, waqdur liya al-khaira haithu kana thumma 'ardini bihi
O Allah, I seek Your help in finding out the best course of action by invoking Your knowledge; I ask You to empower me, and I beseech Your favor. You alone have the absolute power, while I have no power. You alone know it all, while I do not. You are the One Who knows the hidden mysteries. O Allah, if You know this thing [-------] is good for me in my religion, worldly life, and my ultimate destiny, then facilitate it for me, and then bless me in my action. If, on the other hand, You know this thing is detrimental for me in my religion, worldly life, and ultimate destiny, turn it away from me, and turn me away from it, and decree what is good for me, wherever it may be, and make me content with it
Source:- Cyber Counselling Section
Didn't know it all by heart
Next Q. Dua when leaving the Mosque