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

 
 
Опции темы Поиск в этой теме Опции просмотра
Старый 10.09.2012, 23:15   #1  
Blog bot is offline
Blog bot
Участник
 
25,643 / 848 (80) +++++++
Регистрация: 28.10.2006
sashanazarov: Figuring out where some table field is modified
Источник: http://sashanazarov.blogspot.com/201...-field-is.html
==============

Sometimes I need to find out where a particular table field is modified in the X++ code. Normally, I call "Used by" form, filter records out by Reference = Write, put manually breakpoints in the corresponding X++ lines and then run the scenario to see which breakpoint is eventually hit.

However, if there are too many cross-references, I don't bother adding breakpoints manually. Instead, I add a button to xRefReferencesUsedByTypedTree form, set its Label property to "Add breakpoint" and MultiSelect to "Yes", and then override its clicked method like this:

void clicked()
{
container breakpoints;
boolean enable = true;

xRefReferences xRefReferencesLocal;

breakpoints = infolog.breakpoint();

for (xRefReferencesLocal = XRefReferences_ds.getFirst(true) ?
XRefReferences_ds.getFirst(true) : XRefReferences_ds.cursor();
xRefReferencesLocal;
xRefReferencesLocal = XRefReferences_ds.getNext())
{
if (xRefReferencesLocal.line > 0)
{
breakpoints += [xRefReferencesLocal.path()];
breakpoints += [xRefReferencesLocal.line];
breakpoints += [enable];
}
}

infolog.breakpoint(breakpoints);
}
Now, after opening "Used by" form, I simply click "Ctrl+A" and then the new "Add breakpoint" button, so all required breakpoints are in place.





Источник: http://sashanazarov.blogspot.com/201...-field-is.html
__________________
Расскажите о новых и интересных блогах по Microsoft Dynamics, напишите личное сообщение администратору.
 

Похожие темы
Тема Автор Раздел Ответов Посл. сообщение
axaptapedia: Table Field Group Blog bot DAX Blogs 0 02.07.2011 05:37
axaptapedia: Table Field Group Blog bot DAX Blogs 0 25.06.2011 06:33
Халтура в AX2009: идентификаторы из USR в GLS, GLP и даже SYS-слоях EVGL DAX: Программирование 2 21.02.2011 19:44
DynamicsAxSCM: The InventTrans table. Explore various field usages. Blog bot DAX Blogs 0 09.11.2010 19:10
CRM DE LA CREME! Some more useful javascripts for MS CRM Blog bot Dynamics CRM: Blogs 0 04.05.2010 11:05

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

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

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