I have a batch class in AX 2009.
I need to call a Form Method in Class Method.
How can i do it using X++.
Please help.
*This post is locked for comments
I have the same question (0)

I have a batch class in AX 2009.
I need to call a Form Method in Class Method.
How can i do it using X++.
Please help.
*This post is locked for comments
I have the same question (0)In the main method of the class you have "args" parameter, from it you can get calling form
FormRun caller = _args.caller();
now you need to check that form has method you want to call and call it
if (caller is FormRun && formHasMethod(caller, identifierStr(MyMethod)))
{
caller.MyMethod();
}