AXForum  
Вернуться   AXForum > Microsoft Dynamics AX > DAX Blogs
All
Забыли пароль?
Зарегистрироваться Правила Справка Пользователи Сообщения за день Поиск Все разделы прочитаны

 
 
Опции темы Поиск в этой теме Опции просмотра
Старый 05.11.2020, 10:11   #1  
Blog bot is offline
Blog bot
Участник
 
25,459 / 846 (79) +++++++
Регистрация: 28.10.2006
dynamicsaxinsight: Get path for menu item in X++
Источник: https://dynamicsaxinsight.wordpress....u-item-in-xpp/
==============

Purpose:

This post describes how we can get the full menu path of a given menu item.

Product:

Dynamics AX 2012

Code:

static void MAKMenuItemPath(Args _args) { #TreeNodeSysNodeType #Properties #AOT TreeNode menuItemNode = TreeNode::findNode(@"\Menu Items\Display\HRMParameters"); TreeNode menuNode; xRefPaths xRefPaths; xRefReferences xRefReferences; TreeNode parentNode; str path; xRefPaths = xRefPaths::find(menuItemNode.treeNodePath()); while select xRefReferences where xRefReferences.referencePathRecId == xRefPaths.RecId && xRefReferences.Reference == XRefReference::Read { path = SysLabel::labelId2String(menuItemNode.AOTgetProperty(#PropertyLabel)); menuNode = TreeNode::findNode(xRefPaths::findRecId(xRefReferences.xRefPathRecId).Path); if(menuNode && SysTreeNode::path2ApplObjectType(menuNode.treeNodePath()) == UtilElementType::Menu) { parentNode = menuNode.AOTparent(); while(parentNode && parentNode.treeNodePath() != #MenusPath) { path = SysLabel::labelId2String(parentNode.AOTgetProperty(#PropertyLabel)) + " > " + path; parentNode = parentNode.AOTparent(); } info(path); } } }


Источник: https://dynamicsaxinsight.wordpress....u-item-in-xpp/
__________________
Расскажите о новых и интересных блогах по Microsoft Dynamics, напишите личное сообщение администратору.
 

Похожие темы
Тема Автор Раздел Ответов Посл. сообщение
alexef: How to add a field to Item Card in Business Central Blog bot NAV: Blogs 0 22.05.2018 20:11
powerobjects: What is the Learning Path for Dynamics 365? Blog bot Dynamics CRM: Blogs 0 10.04.2018 01:27
NAV Team: How to get back the 'hotfix directories' from NAV 2015 Cumulative Update 1 Blog bot Dynamics CRM: Blogs 0 13.11.2014 16:25
wiki.dynamicsbook: Changes Made in Navision Attain 3.60 Blog bot Dynamics CRM: Blogs 0 02.09.2008 13:23
Вопрос про Demand Planner slava09 DAX: Функционал 4 25.09.2006 11:43
Опции темы Поиск в этой теме
Поиск в этой теме:

Расширенный поиск
Опции просмотра
Комбинированный вид Комбинированный вид

Ваши права в разделе
Вы не можете создавать новые темы
Вы не можете отвечать в темах
Вы не можете прикреплять вложения
Вы не можете редактировать свои сообщения

BB коды Вкл.
Смайлы Вкл.
[IMG] код Вкл.
HTML код Выкл.
Быстрый переход

Рейтинг@Mail.ru
Часовой пояс GMT +3, время: 16:19.
Powered by vBulletin® v3.8.5. Перевод: zCarot
Контактная информация, Реклама.