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

 
 
Опции темы Поиск в этой теме Опции просмотра
Старый 18.10.2012, 19:11   #1  
Blog bot is offline
Blog bot
Участник
 
25,644 / 848 (80) +++++++
Регистрация: 28.10.2006
ax-erp: Search un-used EDT'S using X++
Источник: http://microsoft-dynamics-ax-erp.blo...s-using-x.html
==============



To find unused EDT’s in your Dynamics Ax application, the following code will sscan through the crossreference and display the EDT’s on screen.



Note, you will have to compile your application with crossreference turned on, otherwise you may get all your EDT’s as not used


//True if used
private boolean FindEDTUsed(extendedTypeId _id, str 40 name)
{
XRefNames xRefName;
boolean ret = true;
;


select firstonly xRefName
where xRefName.kind == xRefkind::ExtendedType
&& (xRefName.name == name);

if(xRefName.RecId) {
ret = true; }
else {
ret = false; }
return ret;
}

public void run()
{
Dictionary dict = new Dictionary();
int types;
int i;
int first = true;
Set unusedEDT;
;
unusedEDT = new Set(Types::Integer);
//Find list of EDT
types = dict.typeCnt();
info(dict.typeName(dict.typeCnt2Id(1)));

for(i = 1; i <= types; i++)
{
//process each type
if(!this.FindEDTUsed(dict.typeCnt2Id(i), dict.typeName(dict.typeCnt2Id(i))))
{
if(first == true)
{
info('Unused EDT List');
first = false;
}
//unusedEDT.add(dict.typeCnt2Id(i)); //store it in a set for later use
info(dict.typeName(dict.typeCnt2Id(i)));
}
}}


Источник: http://microsoft-dynamics-ax-erp.blo...s-using-x.html
__________________
Расскажите о новых и интересных блогах по Microsoft Dynamics, напишите личное сообщение администратору.
 

Похожие темы
Тема Автор Раздел Ответов Посл. сообщение
ax-erp: Creating SSRS-Reports in Dynamics AX 2012 – What’s no longer possible in AX-reports Blog bot DAX Blogs 0 18.07.2012 12:11
emeadaxsupport: New Content for Microsoft Dynamics AX 2012 : October 2011 Blog bot DAX Blogs 0 27.10.2011 17:11
axinthefield: Dynamics AX Event IDs Blog bot DAX Blogs 0 01.03.2011 22:11
daxdilip: Whats New in Dynamics AX 2012 (A brief extract from the recently held Tech Conf.) Blog bot DAX Blogs 7 31.01.2011 12:35
axStart: Microsoft Dynamics AX 2009 Hot Topics Web Seminar Series Blog bot DAX Blogs 0 06.08.2008 12:05

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

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

Рейтинг@Mail.ru
Часовой пояс GMT +3, время: 13:55.