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

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...