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

 
 
Опции темы Поиск в этой теме Опции просмотра
Старый 12.02.2013, 02:17   #1  
Blog bot is offline
Blog bot
Участник
 
25,643 / 848 (80) +++++++
Регистрация: 28.10.2006
Axilicious:Dynamics AX 2012 R2 : XppPrePostArgs changes
Источник: http://www.ksaelen.be/wordpresses/dy...targs-changes/
==============

Amongst many other changes made in Microsoft Dynamics AX 2012 R2, there has been soms changed to the XppPrePostArgs class too. But before you even read further, please also have a good read through a series of posts made by Joris Degruyter. The series give a nice overview of using models and events to make you code more upgradable. If there was a bible written for AX, this would be one of the first commandments!

In the series of post, Joris explains the use of the XppPrePostArgs class to fetch arguments you want to use in your event handler class. To get the FieldId from the args when the validateField method was triggered, the following code was used:

if(_args.getArg(_args.args().fieldName(1)) == FieldNum(CustTable, DMProjId)
Well, since R2, the XppPrePostArgs class has been modified to extend object instead of XppEventArgs. (MSDN: http://msdn.microsoft.com/en-us/libr...epostargs.aspx)
One of the concequences is the absence of the args() method. So when you want to do the same thing as above, you now have to use the following code (it’s a bit simplified and less ugly) :

if(_args.getArgNum(1) == FieldNum(CustTable, DMProjId)





Источник: http://www.ksaelen.be/wordpresses/dy...targs-changes/
__________________
Расскажите о новых и интересных блогах по Microsoft Dynamics, напишите личное сообщение администратору.
 

Похожие темы
Тема Автор Раздел Ответов Посл. сообщение
amer-ax: It was a great day! Blog bot DAX Blogs 3 29.12.2012 01:02
DAX: Official Dynamics AX 2012 R2 Content (update) - Where is it, and how can you find out about updates? Blog bot DAX Blogs 0 03.12.2012 11: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

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

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

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