Thursday, 3 October 2019

REFRESH CALLING FORM IN DYNAMICS AX 7 x++ CODE REFRESH PARENT FORM

||REFRESH PARENT FORM on CLOSING THE CHILD FORM ||
Many times we get the requirement to refresh the main parent form or the calling form to be refreshed once the called form or the child form is closed,
Below code needs to be written on the child form method in order to do the same.

public void close()
    {
        FormRun formRun;
        FormDataSource  formDatasource;

        super();

        // Get an instance of the calling form.
        formRun = element.args().caller();
        if(formrun)
        {
            formrun.doResearch(); // Force all parent form data sets to refresh
        }
    }

Thanks,
Vikas Mehta

1 comment:

UX & Personalization: Next-Generation Workspace Experience

  UX & Personalization: Next-Generation Workspace Experience Section Content Title Build Your Dream Workspace: Advanced Personalization ...