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

Dynamically setting entire Form security access through Extension in D365FO

/// <summary> /// To check if user can get access to the Parameter form /// </summary> class SAN_ParamFormsAccessCtrl {     prot...