Thursday, October 22, 2015

How to open Form through X++ or JOB in Ax 2012

Hi friend,

Toady,  I am going to help you how to open Form through code or X++  in AX 2012.
It is very simple, I think most of the people knows any way i am sharing my thoughts.


It has two ways to open the form

1. Open the FORM Name
2. Open the FORM, with Form Display Name. 


1. Open the FORM with Form Name

static void FormOpen(Args _args)
{
   
    Args  args;
    FormRun formRun;
   
    args = new Args();
    args.name(formstr(FormA)); // mention Form Name
    formRun = new FormRun(args);
    formRun.run();
    formRun.wait();
   
}


2. Open the Form with Form Display Name

static void FormOpen(Args _args)
{
 
MenuFunction menuFunction;
menuFunction = new MenuFunction(MenuItemDisplayStr(FormA), MenuItemType::Display);
menuFunction.run();
   
   
}


Happy Daxing...

No comments:

Post a Comment