Close Form(s)

TodAnderson

Hi,


 


I have a right click function that opens a form on a sales order, and a customize rule that closes the form when the sales order form is closed. however , if the user navigates to another sales order and does the right click again, they now have 2 of the forms open, but when the close the sales order form, only the first of the 2 forms closes.


 




Form myForm = Form.GetFormFromType("FRM_APRD",  0);
myForm.Close();
return true;


 


Is there a way to get all of them to close when the sales order is closed?


TodAnderson

found the solution


 




foreach (Form frm in Form.GetAllForms())
{
if (frm.Type.Equals("FRM_APRD")) {
frm.Close();
}
}

0

Comments

0 comments

Please sign in to leave a comment.

Didn't find what you were looking for?

New post