Ata bin Abi Rabah narrates: Sayyiduna al-Sharid (may Allah be pleased with him) came to the Prophet (peace and blessings be upon him) on the day of the Conquest and said: "O Messenger of Allah, I vowed that if Allah Almighty granted you the conquest of Makkah, I would pray in Bayt al-Maqdis (Jerusalem)." The Prophet (peace and blessings be upon him) said: "Pray here." He said this three times.
Al-Tabarani recorded it in al-Mu'jam al-Kabir as a mursal report, and its narrators are thiqat (trustworthy).