Skip to main content

Posts

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. https://community.dynamics.com/365/financeandoperations/f/dynamics-365-for-finance-and-operations-forum/316468/how-to-get-aot-objects 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