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 :
Dynamics 365 Community / Forums / Finance forum / Difference between Coc...
Finance forum

Difference between Coc and Event Handler in D365

(1) ShareShare
ReportReport
Posted on by 155

Hello Everyone,

Can anyone help me to understand the difference between Coc & Post Event Handler in 365.

I have the same question (0)
  • Verified answer
    Mea_ Profile Picture
    60,284 on at

    Post Event Handler is static, does not allow you to have access to protected members of a class. Also you cannot add new method or class state via event handler, so CoC is way more powerful.

  • Verified answer
    Jie G Profile Picture
    on at

    Hi Mayur,

    COC is nearly the same as pre and post handlers, pre being before the next call and post after it. The advantage of chain of command is you can share the same method variables in the pre and post (before/after next() call) or share the same tts block inside your COC method. COC also supports return value and parameter modification of the extended method in a much more readable manner.

    For more details, community.dynamics.com/.../ax7-d365-chain-of-command-with-example

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

November Spotlight Star - Khushbu Rajvi

Congratulations to a top community star!

Forum Structure Changes Coming on 11/8!

In our never-ending quest to help the Dynamics 365 Community members get answers faster …

Dynamics 365 Community Platform update – Oct 28

Welcome to the next edition of the Community Platform Update. This is a status …

Leaderboard > Finance

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans