07.10.2019, 16:48 | #1 |
Участник
|
dynamicsnavax: Loop through AOT Display Menu Items #MSDyn365FO
Источник: http://dynamicsnavax.blogspot.com/20...enu-items.html
============== 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/f...et-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.
{ 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 var enum = Microsoft.Dynamics.Ax.Xpp.MetadataSupport::GetModelsOfMetadataArtifact (menuItemName, axMenuItemTypeDisplay).GetEnumerator (); str modelName = enum.moveNext () ? enum.Current.DisplayName : ''; MenuFunction menuFunction = new MenuFunction (menuItemName, MenuItemType::Display); info (strFmt ("menuItemName: %1, menuItemLabel: %2, modelName: %3", menuItemName, menuFunction.label (), modelName )); } } Источник: http://dynamicsnavax.blogspot.com/20...enu-items.html
__________________
Расскажите о новых и интересных блогах по Microsoft Dynamics, напишите личное сообщение администратору. |
|
|
Опции темы | Поиск в этой теме |
Опции просмотра | |
|