Before the Megila reading on Purim night, the reader recites three Berachot: “Al Mikra Megila,” “She’asa Nissim,” and “Shehehiyanu.” Our custom is to recite the Beracha of “Shehehiyanu” only before the nighttime Megila reading, and not in the morning. Therefore, before the morning Megila reading, the reader recites only two Berachot – “Al Mikra Megila,” and “She’asa Nissim.”
When reciting the Beracha of “Shehehiyanu” before the nighttime reading, one should have in mind all the Misvot of Purim – the morning Megila reading, Mishloah Manot, Matanot La’ebyonim, and the Purim feast. The reader must also have in mind while reciting the Berachot that he recites them on behalf of the entire congregation, and that they fulfill their obligation through his recitation.
If the reader forgot to recite the Beracha of “Shehehiyanu” before the nighttime reading, and he realized his mistake only after he began reading the Megila, he should stop where he is, recite the Beracha, and then resume the reading. The Ben Ish Hai (Rav Yosef Haim of Baghdad, 1833-1909) maintains that this Halacha applies only until one reads of the hanging of Haman’s ten sons, which completes the main story of the Purim miracle. If one remembered after that point that he had not recited the Beracha of “Shehehiyanu,” according to the Ben Ish Hai, then he should simply continue the reading, and should not interrupt to recite the Beracha. Hacham Ovadia Yosef, however, disputes this ruling, and maintains that as long as one has not yet completed the Megila, even if he has reached the final verse, he should stop, recite “Shehehiyanu,” and then continue.
If one completes the entire reading and then realized he did not recite “Shehehiyanu,” then he recites the Beracha the next morning, before the daytime Megila reading. Although our custom is not to recite “Shehehiyanu” before the morning reading, as mentioned, if the Beracha was mistakenly omitted before the nighttime reading it should be recited before the daytime reading.
Summary: Before the nighttime Megila reading one recites the three Berachot of “Al Mikra Megila,” “She’asa Nissim,” and “Shehehiyanu,” but only the first two of these Berachot are recited before the daytime reading. When reciting “Shehehiyanu,” one should have all the Misvot of Purim in mind. If one forgot to recite “Shehehiyanu” and he remembered at some point during the reading, he should stop the reading, recite the Beracha and then continue. If he realized his mistake only after the entire reading, he recites the Beracha the next morning before the daytime reading.