General

How To Refresh Form From Class In Ax 2012

How to Refresh a Form From a Class in Ax 2012

The refresh() method refreshes the form controls without rereading the data from the database, so changes to the record won’t be visible after the execution. This method accepts an optional argument, a row number for a form grid. The special argument values -1 or -2 redraw records with displayOptions and are marked. Here’s a code example for refreshing the form from a class.

First, the FormRun class gets a reference to the calling form. It then iterates the list of root data sources, including updated fields. The form then renders the updated values and closes its dialog form. The code example below shows how to refresh a form from the dialog form. The refresh method will update the parent form when the parent form receives information from a dialog box.

Leave a Reply

Your email address will not be published. Required fields are marked *