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; }
This is even easier than before!
Hey Martin, thanks for the share, it is indeed easier now.
But please, how can i create a lookup on the list of classes or tables withing AX7 if they are not in UtilElement anymore ?
You can put them to a temporary table and base your lookup at this table.
Yeah, thought there could be a better solution.
Thanks again !
Hi Martin,
I had struck up in a requirement.I need to check whether the form is customized or not through the code and print some of the details in a document.
Example : If the form is customized means i need execute the condition 1,if not means i need to execute the condition 2.
Anyone help me to achieve the requirement.
Regards,
Alex Jones AX
Hi Alex, sorry for the late response; I was on a vacation.
The requirement sounds very strange to me. Can you please explain what you’re trying to achieve by that? Note that a discussion forum would be a better place for such questions, there are more people who can help you.