How to refresh the data source of caller form using X++ in AX 2009?

In many cases you need to refresh the data source of the caller form when you finishing work with the current form like when you using posting form you need to refresh the data source of the caller form to see the effect write the following code in close method of the current form :


public void close()
{
 FormRun         callerForm;
;
    callerForm          = element.args().caller();
    callerForm.dataSource().refresh();
    callerForm.dataSource().reread();
    callerForm.dataSource().research();
    super();
}

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.