Allama Ibn Jouzi narrates from Ibn Banan Ispahani.
One night, Ibn Ispahani saw the Beloved Prophet (sallallahu alaihe wa sallam) in a dream. In the dream, Ibn Ispahani asked the Beloved Prophet (sallallahu alaihe wa sallam): “Oh Rasool Allah (sallallahu alaihe wa sallam)! Your descendant Muhammad ibn Idrīs has departed from this world. Do you have any special gift for him?” In reply, the Beloved Messenger of Allah (sallallahu alaihe wa sallam) stated: “I have prayed to Almighty Allah Subhanahu Wa Tala'a for the complete forgiveness of ibn Idrīs Al-Shafi'i on the Day of Judgment.”
After hearing this, Ibn Banan Ispahani asked the Beloved Prophet (sallallahu alaihe wa sallam) how Imam al-Shafi'i (rahmatullahi alaihe) reached such an elevated position. The Beloved Prophet (sallallahu alaihe wa sallam) replied: “Shafi'i used to recite such a Durood upon me that on one else has ever recited before. When asked about the particular Durood, the Beloved Prophet (sallallahu alaihe wa sallam) stated: