web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Answered

Coc and event handler

(0) ShareShare
ReportReport
Posted on by 15

Dear Experts, 

I need to understand if there is any logic in when to user COC and when to use Event handlers. 

Thanks

I have the same question (0)
  • Verified answer
    GirishS Profile Picture
    27,827 Moderator on at

    Hi JamesAX,

    Please go through the below thread which talks about the same.

    https://community.dynamics.com/365/financeandoperations/f/dynamics-365-for-finance-and-operations-forum/467736/event-handler-vs-chain-of-command/1283407

    Thanks,

    Girish S.

  • Suggested answer
    Deepak Agarwal Profile Picture
    8,602 on at

    Its depends , whats your business case and requirement. Event handlers are mainly on std methods and available on different node of different objects. For eg, you will see event handler on table, on form, form data source, any field on form, button on forms. They names as self explanatory.

    While COC is mainly use when you need to write more complex business case and provide you mode flexibility on code. However you can not write both COC and event handler with same class.

    You will found plenty of  blogs on how to write COC and event handler.

  • JamesAX Profile Picture
    15 on at

    Thanks, Girish and Deepak.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > Finance | Project Operations, Human Resources, AX, GP, SL

#1
Martin Dráb Profile Picture

Martin Dráb 503 Most Valuable Professional

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 434 Super User 2025 Season 2

#3
BillurSamdancioglu Profile Picture

BillurSamdancioglu 278 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans