Skip to main content

Posts

Showing posts with the label refresh method

Use of Data Source Methods in MSD axapta

Use of Data Source Methods in axapta Adding a new record from a form will call the following sequence of data source methods: create() ► initValue() ► refresh() ► active() ► refresh() 1. The method create() is called when pressing ctrl+n to add a new record. 2. The data source initValue() is called by create(). You should initialize fields which must have a specific value in initValue(). The table method initValue() is called by super() in the data source initValue(). If the initialized values are not form specific, you should use the corresponding table method. 3. After initialization refresh() is called, and when entering a record active() is called. Refresh is called again by active(). When saving a record the following methods are called: validateWrite() ► write() ► refresh() 1. ValidateWrite() will call the table method validateWrite(). Again, always use the corresponding table methods if possible. 2. The data source method write() will call either insert() or update