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

Convert Call stack to readable format in D365FO X++

//Input --container _xppCallStack = xSession::xppCallStack();  Public static str POL_formatXppCallStack(container _xppCallStack, int _skipFr...