Narrated Jabir (bin 'Abdullah) (RA):
A man said on the day of the Fath, "O Messenger of Allah, I have vowed that if Allah opens the conquest of Makkah at your hands I shall pray in Jerusalem." He replied, "Pray here." He asked him again and he replied, "Pray here." He asked him again and he replied, "It's up to you, then."[Reported by Ahmad and Abu Dawud. al-Hakim graded it Sahih (authentic)].
Reference: Bulugh al-Maram 1394
In-book reference: Book 13, Hadith 21
English translation: Book 13, Hadith 1394