Thursday, January 21, 2016

Refreshing caller form in ax 2012

//To refresh caller form ax 2012

//CLass
#Task
    FormRun formRun;
    formRun = element.args().caller();
    if(formRun)
    {
        formRun.task(#taskF5);
    }

//form
FormRun             callingForm;
    Object              o;

;
 callingForm = this.args().caller() as FormRun;
        if (callingForm != null && formHasMethod(callingForm, identifierStr(refresh)))
        {
            o = callingForm;
            o.refresh();
        }


callingForm          = element.args().caller();
callingForm.dataSource().refresh();
callingForm.dataSource().reread();
callingForm.dataSource().research();

No comments:

Post a Comment

Search hierarchy for a match (TableALLGroup) X++

  Table1 ppt;  select firstonly ppt  order ItemCode, ItemRelation, AccountCode, AccountRelation where      (ppt.ItemCode == TableGroupAll::T...