This post is machine-translated. The original post in german language can be found here.

Open a modal form

To call a modal form, the following code could be used (in clicked()-method of a button):

void clicked()
{
    FormRun formRun;
    Args args = new Args();

    super();
    
    args.name(formStr(MyFormName));
    args.record(SalesLine);

    formRun = classFactory::formRunClassOnClient(Args);

    formRun.init();
    formRun.run();
    If (!formRun.closed())
    {
        formRun.wait(true);
    }
}

Using this code, nearly every form could be opened in a modal way, so you have to close the form first before you will be able to return to AX.

These post applies to following versions:
Dynamics AX 2009, Dynamics AX 2012

Add comment
 
 

 

 
 
 
Posts of the actual month
April 2024
MoTuWeThFrSaSu
1234567
891011121314
15161718192021
22232425262728
2930 
 
© 2006-2024 Heinz Schweda | Imprint | Contact | German version | Mobile version
In order to provide you with better service, this site uses cookies. By continuing to browse the site, you are agreeing to our use of cookies.