Sunday, October 26, 2014

Form to Form Args passing in Ax 2012

\\ Form to Form Args passing in Ax 2012

Form 1:
public class FormRun extends ObjectRun
{
   FirstForm FirstForm;
}
    Args args;
    FormRun formRun;
    ;
    super();
    args = new args(formstr(FormSecond));
    args.record(FormFirstTable);
    formrun = classfactory.formrunclass(args);
    formrun.init();
    formrun.run();
    formrun.wait();
    formrun.detach();


Form 2:
public class FormRun extends ObjectRun
{
    FormFirstTable _FormFirstTable;
}

public void init()
{
    super();
    _FormFirstTable = element.args().record();
    FormSecondTable_ds.query().dataSourceTable(Tablenum(FormSecondTable)).addRange(fieldNum(FormSecondTable,SecondForm)).value(SysQuery::value(_FormFirstTable.FirstForm));
}

No comments:

Post a Comment

Copy Markup charges while posting purchase invoice using X++

 Copy Markup charges while posting purchase invoice using X++ Class: Important: Code logic is just for Reference.  New class => Duplicate...