Refresh Parent Form after updating data in child form

Hi,
when you want to refresh the parent form after updating data in child form,


void click()
{
FormRun   fr;
MenuFunction  mf;
Args    args = new Args();
;
//super();
mf = new MenuFunction(menuitemdisplaystr('SalesTable'),MenuItemType::Display);
args.record(SalesLines);
fr = mf.create(args);
fr.run();
fr.wait(true);
SalesLine_ds.reread();
SalesTable_ds.research(true); //true value is important
}




(or)



if (this.parmArgs() &&
    this.parmArgs().record() &&
    this.parmArgs().record().dataSource())
{
    formDataSource = this.parmArgs().record().dataSource();
    formDataSource.reread();
    formDataSource.research(true);
}



Comments

Popular posts from this blog

x++ code to Generate cheque for vendor payment journal

Import Procurement Hierarchy / Categories with out code in ax 2012

Copy favorites From one user to another user - Ax 2012