Reputation: 6585
I have created some form in which it sended a few items to the sales lines in sales order detail form. What I need now is some logic to check if salesquotation detail form is open in the background then close it. Can anyone help.
Upvotes: 2
Views: 559
Reputation: 18061
It is not best practice to close forms by code, the user should be in control.
But if you insist:
void close()
{
if (formRun && !formRun.closed())
formRun.close();
super();
}
This closes a child form (if not already closed) when closing the current form.
Of course this requires you to open the child form by code as explained here.
Upvotes: 1