Wednesday, November 15, 2017

Dynamics 365 - UtilElements in AX 7

In older versions of Dynamics AX, you can get information about AX application objects (metadata) through system “tables” such as UtilElements. This doesn’t work anymore in AX 7. These tables still exist, but they don’t have any data, therefore you have to migrate to another solution.

AX 7 comes with a rich framework for metadata, implemented in several assemblies in namespace Microsoft.Dynamics.AX.Metadata. But it’s too complex for simple tasks – you can make it much simpler by using MetadataSupport class. For example, the following piece of code iterates through all form names:


var forms = Microsoft.Dynamics.Ax.Xpp.MetadataSupport::FormNames();

while (forms.MoveNext()){    print forms.Current;}

No comments:

Post a Comment