Skip to main content


Showing posts from October, 2019

Loop through AOT Display Menu Items #MSDyn365FO

I have been experimenting with getting Metadata information from the AOT from FinOps. There is some discussion on this forum post which helped me. I thought I would try to clean it up a bit to make it a bit more readable for future reference. The X++ code below will loop through Display menu items in the AOT and print some info. Menu Item Name Menu Item Label Model Name public static void main (Args _args) { System.Type axMenuItemTypeDisplay = new Microsoft.Dynamics.AX.Metadata.MetaModel.AxMenuItemDisplay ().GetType (); System.Collections.Specialized.StringEnumerator menuItemDisplayNames = Microsoft.Dynamics.Ax.Xpp.MetadataSupport::MenuItemDisplayNames (); while (menuItemDisplayNames.moveNext ()) { str menuItemName = menuItemDisplayNames.get_current (); //Get Model Name for the display menu item