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

 
 
Опции темы Поиск в этой теме Опции просмотра
Старый 03.05.2008, 08:16   #1  
Blog bot is offline
Blog bot
Участник
 
25,475 / 846 (79) +++++++
Регистрация: 28.10.2006
Developer notes: Write InfoLog to database
Источник: http://axdevnotes.blogspot.com/2008/...-database.html
==============

There are several batch tasks running on the schedule in our company. They send many messages to InfoLog. Usually I am interesting messages of some type. It is not convenient scroll all messages in SysInfologBrowser form in search of required. I decided to implement the method for writing InfoLog to the database. After investigation of the Info class I wrote code listed below.

X++:
protected Log logTxt()
{
    #resAppl   
    #Define.UserTab('\t')
  
    Integer                 fromIdx  = transLogPoint + 1;
    Integer                 toIdx    = infoLog.num();
    SysInfoLogEnumerator    enum = SysInfologEnumerator::newData(infoLog.copy(fromIdx, toIdx));
    Log                     logTxt;
    DictEnum                dictEnum = new DictEnum(enumNum(Exception));
    ;
    while (enum.moveNext())
    {
        logTxt += strFmt("%1 \t %2\r\n",
                            dictEnum.index2Name(enum.currentException()),
                            strRem(enum.currentMessage(), #UserTab));
    }

    transLogPoint = toIdx;
    return logTxt;
}
Variable transLogPoint keep the value of the last message index before start batch task.


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

Похожие темы
Тема Автор Раздел Ответов Посл. сообщение
Developer notes: Inventory closing make corrections for transactions in closed periods Blog bot DAX Blogs 2 15.07.2008 20:52
Developer notes: Be careful whith Collections and Maps in Axapta Blog bot DAX Blogs 0 13.05.2008 19:05
Developer notes: Why debit and credit turnovers different in Ledger and Inventory modules? Blog bot DAX Blogs 0 03.05.2008 08:16
Developer notes: Null value for ADO command parameter Blog bot DAX Blogs 0 03.05.2008 08:16

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

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

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