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

 
 
Опции темы Поиск в этой теме Опции просмотра
Старый 13.01.2009, 18:32   #1  
bakingtheiron is offline
bakingtheiron
Участник
 
2 / 10 (1) +
Регистрация: 13.01.2009
Infolog: using prefix with one message
I'm currently using the infolog to warn users when they have entered a duplicate employee.

X++:
setprefix('Customer record added has one or more duplicate name and search-name combinations:');

while select blah........
{
    info(strFmt('Name: %1, Name Alias: %2, Group: %3, Currency: %4', tCustTable.Name,tCustTable.NameAlias,tCustTable.CustGroup, tCustTable.Currency));
}
Problem is in most cases there will only be one other user with the same first and last name combination. If there are no other messages present in the infolog, the infolog display like a dialog box cutting out my tree title explanation.

How do I get the full size infolog with only one message in it (or one prefix containing one message)?

Working in AX4.0 SP2
Старый 15.01.2009, 08:38   #2  
coolibin is offline
coolibin
Участник
 
264 / 68 (3) ++++
Регистрация: 07.04.2005
Цитата:
Сообщение от bakingtheiron Посмотреть сообщение
How do I get the full size infolog with only one message in it (or one prefix containing one message)?
It seems like it always works that way. I am not sure about ax4, but in ax3 you could change the command
X++:
hasPrefix = false;
to
X++:
hasPrefix = true;
in a method Classes\Info\viewBuild
It will force infolog to appear as a tree in any case.
За это сообщение автора поблагодарили: bakingtheiron (1).
Старый 15.01.2009, 09:48   #3  
belugin is offline
belugin
Участник
Аватар для belugin
Сотрудники Microsoft Dynamics
Лучший по профессии 2017
Лучший по профессии 2015
Лучший по профессии 2014
Лучший по профессии 2011
Лучший по профессии 2009
 
4,622 / 2925 (107) +++++++++
Регистрация: 16.01.2004
Записей в блоге: 5
addone more setPrefix call in the "root" method. For example if you are calling the method from a RunBase descendant, add setPrefix(this.caption()) to the start of the run() method
За это сообщение автора поблагодарили: bakingtheiron (1).
Старый 15.01.2009, 12:27   #4  
bakingtheiron is offline
bakingtheiron
Участник
 
2 / 10 (1) +
Регистрация: 13.01.2009
Цитата:
Сообщение от coolibin Посмотреть сообщение
It seems like it always works that way. I am not sure about ax4, but in ax3 you could change the command
X++:
hasPrefix = false;
to
X++:
hasPrefix = true;
in a method Classes\Info\viewBuild
It will force infolog to appear as a tree in any case.
This forces the tree view like you said, but I'm unsure of what my superiors will think of it.

----
Цитата:
Сообщение от belugin Посмотреть сообщение
addone more setPrefix call in the "root" method. For example if you are calling the method from a RunBase descendant, add setPrefix(this.caption()) to the start of the run() method
This is being called via a validateWrite() on a table. I wish to keep all of this on the table.

Many thanks to both of you, I didn't have much hope of getting around this problem.

I cheated with my solution:
X++:
warning('warning message');
setPrefix(' ');

//then the while, etc
This works, and doesn't look too bad. Its only purpose being to warn the end user.

Thanks again guys

Последний раз редактировалось bakingtheiron; 15.01.2009 в 12:39.
 

Похожие темы
Тема Автор Раздел Ответов Посл. сообщение
gatesasbait: How to temporarily suppress infolog messages in Dynamics Ax (deux) Blog bot DAX Blogs 7 28.01.2009 17:45
DAX 4.0: infolog & workspaceNum petergunn DAX: Программирование 3 22.01.2009 11:32
Developer notes: Write InfoLog to database Blog bot DAX Blogs 0 03.05.2008 08:16
axaptafreak: Send message to online user in Dynamics AX 4.0 (quick & dirty) Blog bot DAX Blogs 0 12.04.2007 16:10
casperkamal: Customizing Infolog through SysInfoAction Blog bot DAX Blogs 0 30.01.2007 20:20

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

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

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