When I had the honour of visiting the mausoleum of my master
Hazrat Imam Abul Hasan ar-Raza and was returning home, I stayed at Nishapur for some time. Many of the Shias used to visit me. From the discussions I had with them, I surmised that they were amazed and astonished at the Ghaibat of Imam-e-Zaman (a.s.).
They were unfortunately haunted by doubts regarding Hazrat (a.s.). They had astrayed from the straight path through their personal opinions and analogy. I tried my best to discuss with them and bring them back to the right path. Hence, I invited their attention to the authentic traditions of the Holy Prophet (s.a.w.s.) and his purified household (a.s.0 in this regard.
One day I was pondering upon the comfortable life that I had lived in my town of Rayy, with my family, children and brothers. All of a sudden sleep overcame me. I dreamt that I was circumabulating around the Kaaba. In the seventh round I came to Hajar-e-Aswad and kissed it saying, “This is a trust that I submit and the covenant that I fulfill so that you give witness of my loyalty.”
(Supplication that the pilgrims recite at the Black Stone)
At that very moment I saw my Master, Hazrat Qaem Sahebuzzaman (Peace be upon him) as he stood at the door of Kaaba. I went towards him in a condition of grief and remorse. Hazrat (a.s.) came to know my inner feelings by looking at my face. I said ‘salaam’ to him and after replying he said, “Why don’t you compile a book on the subject of ghaibat so that you become free of sorrow and grief. ” I said, “Son of the Prophet of Allah, I have collected some matter regarding ghaibat.” He (a.s.) told me, “It is not as I want it to be written. Noro write a comprehensive book on Ghaibat and also mention therein the Ghaibat of the Prophets of Allah,” said the Imam (a.s.).
After this Hazrat (a.s.) departed. I awoke with a start and spent the time from dawn till sunrise; in prayers, supplications and entreaties to Allah. I complained about the difficult times. When it was morning, I began to write the book as ordered by the Hujjat of Allah. I continued to pray to Allah for help and also sought forgiveness of sins.
(Introduction to the book Kamaluddin by Shaykh Sadooq. Persian Translation Published in two volumes.)