Показать сообщение отдельно
Старый 18.06.2011, 15:02   #9  
Alex_KD is offline
Alex_KD
Участник
AxAssist
MCBMSS
Соотечественники
 
522 / 362 (14) ++++++
Регистрация: 06.07.2006
Адрес: Melbourne, Down Under
Цитата:
My next Idea was to get the information out of table UtilIdElements but this Table is not in the SQL Database so i can't set a trigger to it to monitor changes.
Try to stick with this one.
You should be able to get all AOT elements that were modified.

Please find the sample xpp code, which returns all elements that were modified in the last 5 minute (300 second), below:
X++:
 UtilIdElements          utilIdElements;
         utcdatetime        datetime;
         date   modifyDate;
         ;
      
          begin = WinApi::getTickCount();
          modifyDate = systemdateget();

          datetime = DateTimeUtil::newDateTime(modifyDate,  ((timenow() - 300) > 0)?(timenow() - 300):(0));
    
          while select name, id, recordType from utilIdElements
          where  (utilIdElements.createdDateTime > datetime) ||
               (utilIdElements.modifiedDateTime > datetime)
           {
                switch(utilIdElements.recordType)
                 {
                       ......
                 }
           }
__________________
AxAssist 2012 - Productivity Tool for Dynamics AX 2012/2009/4.0/3.0
За это сообщение автора поблагодарили: Dark Smile (1).