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

 
 
Опции темы Поиск в этой теме Опции просмотра
Старый 18.08.2023, 10:11   #1  
Blog bot is offline
Blog bot
Участник
 
25,475 / 846 (79) +++++++
Регистрация: 28.10.2006
d365technext: Chain of Command VS Event Handlers
Источник: https://d365technext.blogspot.com/20...-handlers.html
==============



Differences & Advantages







Chain of Command (COC):

Chain of Command is an extension framework in D365FO that allows developers to customize and extend standard application logic without modifying the original code. It enables you to add new business logic, validations, and modifications to existing methods in base classes. COC works by creating an extension class for the base class you want to modify and then overriding or adding methods within this extension class. COC supports before, after, and around method events.




Advantages of COC:


  • Non-intrusive: Original code remains untouched.
  • Supports method extensions.
  • Facilitates the coexistence of multiple extensions.

Event Handler:

Event handlers are programming constructs that allow you to subscribe to specific events that occur during the execution of application logic. They provide a way to respond to actions or state changes in the system. In D365FO, event handlers are often used to react to events such as record creation, modification, deletion, or specific actions taken by users. Event handlers are decoupled from the base code and are defined in a separate class.




Advantages of Event Handlers:


  • Decoupled: Separates customization from core logic.
  • Supports centralized event management.
  • Allows multiple subscribers to the same event.

In summary, COC and event handlers are both mechanisms to customize and extend Dynamics 365 Finance and Operations without directly modifying the original code. COC focuses on extending methods in base classes, while event handlers focus on reacting to events during application execution. The choice between COC and event handlers depends on the nature of customization required and the specific use case.



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

Похожие темы
Тема Автор Раздел Ответов Посл. сообщение
sertandev: Accessing extension instance variables within Dynamics 365 FO form event handlers Blog bot DAX Blogs 0 30.05.2018 20:11
sertandev: AX7 Extensibility – Part 3 : Event handlers and delegates (hooks) Blog bot DAX Blogs 0 20.03.2018 13:11
sertandev: AX7 Extensibility – Part 3 : Event handlers and delegates (hooks) Blog bot DAX Blogs 0 28.08.2017 19:11
Navigate Into Success: Trick: Subscribing to any Control Add-in event through pure C/AL Blog bot Dynamics CRM: Blogs 0 04.08.2014 11:00
emeadaxsupport: Project Server Integration–the list of event handlers created by Dynamics AX synchronization Blog bot DAX Blogs 0 18.04.2011 23:11

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

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

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