Setting default values on a new record in a Grid is a simple task. To do this, you need to override the initValue() method on the Form's Data Source. Let say I have a Table named tblDefault which contains two fields TheDate, which is a UtcDateTime type, and Who, which is a String type. In my example, I want the TheDate field to default to … Continue reading AX – D365FO – Setting Default Values on a New Record in a Grid
Category: Grid
AX – D365FO – Refresh grid data with Command Button
To refresh grid data of a Form grid just create a Command Button and set Command Property to Refresh Obviously the button must be created under a Group button object and this under an Action Pane which contains the data source that must be refreshed.
AX – D365FO – Mark a form grid record with checkbox
This example mark all records of a form grid record looping throught the data source public void selectall(boolean _select) { CompanyInfo localCompanyInfo; localCompanyInfo = companyInfo_ds.getFirst(); while(localCompanyInfo) { this.findRecord(localCompanyInfo); this.mark(_select); localCompanyInfo = companyInfo_ds.getNext(); } }
AX – D365FO – Change Background or text color of a Form grid row
You can use FormDataSource.displayOption method This method is executed one time for each record before the record is displayed in a form. The displayOption method can be overridden on a form data source. Right-click the Methods node under the data source, point to Override Method, and then click displayOption. This is an example public void displayOption(Common _record, FormRowDisplayOption _options) … Continue reading AX – D365FO – Change Background or text color of a Form grid row