On August 2, 1912, Abdu'l-Baha was about to set out on his trip to Dublin, New Hampshire. During his journey, he certainly prayed for his friends and family. Did he expect all of his prayers to be answered?
Actually, Abdu'l-Baha talked about prayer during one of his talks in Dublin. On August 5th he said ther following:
"God will give to us when we ask Him. His mercy is all-encircling.
But we ask for things which the divine wisdom does not desire for us, and there is no answer to our prayer. His wisdom does not sanction what we wish. We pray, “O God! Make me wealthy!” If this prayer were universally answered, human affairs would be at a standstill. There would be none left to work in the streets, none to till the soil, none to build, none to run the trains. Therefore, it is evident that it would not be well for us if all prayers were answered. The affairs of the world would be interfered with, energies crippled and progress hindered. But whatever we ask for which is in accord with divine wisdom, God will answer. Assuredly!
For instance, a very feeble patient may ask the doctor to give him food which would be positively dangerous to his life and condition. He may beg for roast meat. The doctor is kind and wise. He knows it would be dangerous to his patient so he refuses to allow it. The doctor is merciful; the patient, ignorant. Through the doctor’s kindness the patient recovers; his life is saved. Yet the patient may cry out that the doctor is unkind, not good, because he refuses to answer his pleading.
God is merciful. In His mercy He answers the prayers of all His servants when according to His supreme wisdom it is necessary. "
The above passage is taken from the book The Promulgation of Universal Peace.