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

 
 
Опции темы Поиск в этой теме Опции просмотра
Старый 25.01.2019, 15:11   #1  
Blog bot is offline
Blog bot
Участник
 
25,459 / 846 (79) +++++++
Регистрация: 28.10.2006
ievgensaxblog: MSDyn365FO. Add postTargetProcess method to a Data Entity via extension.
Источник: https://ievgensaxblog.wordpress.com/...via-extension/
==============

Quite a while ago I wrote a blog post about postTargetProcess method that could be added to a data entity for post processing. Previously, you could add it only to a newly created entity, but now you can extend any entity using CoC.

This method is a bit special because it is not declared on the parent object, but is called via reflection by DMFEntityBase class. Full list of method that work in the same way:
  • defaultCTQuery
  • copyCustomStagingToTarget
  • postGetStagingData
  • preTargetProcessSetBased
  • postTargetProcess
DMFEntityBase uses tableHasStaticMethod() to check if a method is defined and DictDataEntity.callStatic() to call it. In the latest PUs Microsoft added support of CoC methods to Dict* API and reflection methods, so now it is possible to use CoC method in this scenario as well.

Extension is quite simple and straightforward, all you need to do is to declare static method with respective signature and do not call next because this method is not defined on the parent object:

[ExtensionOf(tableStr(MyDataEntity))]final public class MyDataEntity_Extension{ public static void postTargetProcess(DMFDefinitionGroupExecution _dmfDefinitionGroupExecution) { //do stuff }}

Источник: https://ievgensaxblog.wordpress.com/...via-extension/
__________________
Расскажите о новых и интересных блогах по Microsoft Dynamics, напишите личное сообщение администратору.
Теги
chain of command, d365fo, data entity, data management

 

Похожие темы
Тема Автор Раздел Ответов Посл. сообщение
atinkerersnotebook: Configuring a BYODB and Creating a Full and Incremental Entity Export Blog bot DAX Blogs 0 25.05.2018 15:11
dennis365foroperations: Yes, it’s here! The Copy configurations feature (and a look at other improvements related to Data Management) Blog bot DAX Blogs 0 12.10.2017 16:11
stoneridgesoftware: Automated Data Entity Import Using DIXF in Dynamics AX Blog bot DAX Blogs 0 07.08.2017 20:19
emeadaxsupport: SEPA affected objects Blog bot DAX Blogs 0 29.11.2013 13:11
atinkerersnotebook: Using the Dynamics AX Excel Add-In Blog bot DAX Blogs 1 25.09.2013 07:11
Опции темы Поиск в этой теме
Поиск в этой теме:

Расширенный поиск
Опции просмотра

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

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

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