Refresh AX grid color with displayOption

We have a displayOption implemented for the Vendor transactions screen, which highlights the rows in red color where the posted transactions or the journal has a Document attachment. The requirement was that if we create a new DocuRef entry on the vendor transaction, after closing the DocuView form the grid should change color. In order to refresh AX grid color with displayOption only for the currently selected row we can use the FormDataSource.clearDisplayOption method.

Also there is a great comment on the Dynamics Community about refreshing a set of entries, instead of the current cursor:

https://community.dynamics.com/ax/f/33/t/191245

We have edited \Forms\DocuView\Methods\close as per below to achieve refreshing only the currently highlighted row:

DAXRunBase / 2017-02-20 / AX 2012 / 0 Comments

DAXRunBase / 2016-11-22 / AX 2012 / 1 Comment

Add AX FormGroupControl runtime

Apparently you cannot populate a form data group runtime in AX. I have been able to overcome the issue by adding the controls dynamically. In this example I have created a form with InventTable as the datasource, and added a FormGroupControl called FormDataGroup with AutoDeclare = Yes. Then I have overridden the executeQuery() on InventTable_ds to call my custom method stored on the form. Here is the source to add AX FormGroupControl runtime from code:

 

DAXRunBase / 2016-09-21 / AX 2012 / 3 Comments

AX License Configuration details

In older versions of AX we could see additional details under System administration > Setup > Licensing > License configuration that has been missing from the more recent versions. Here is an update done in version 2012 R3 to have better AX License Configuration details by showing the configuration key name in the AOT, the application layer and the model:

AX License Configuration details

The heart of the code is as per below to populate the 3 form controls, called in the Tree.selectionChanged() method:

Here is the XPO of the changes:

Forms_SysConfiguration.zip

DAXRunBase / 2016-09-19 / AX 2012 / 1 Comment

1 2 3 9