close method call prevention when more than one times a same form is opened

Hi all,

   I am facing issue on ax 2009, At first I have written a piece of code to send mail to the contact person in the contact person form close method when some changes made, when I open two contact person form for same busrelation and when i make changes in one contact person form and while closing both the form one after the other two times the process is carried , instead I want only one time to process , and second time the process should not take place. Please suggest some answer if possible.





Thanks in advance,