prodev42
prodev42

Reputation: 6585

How do I close SalesQuotation Details Form in the background?

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

Answers (1)

Jan B. Kjeldsen
Jan B. Kjeldsen

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

Related Questions