Hello Everyone,
Can anyone help me to understand the difference between Coc & Post Event Handler in 365.
Hello Everyone,
Can anyone help me to understand the difference between Coc & Post Event Handler in 365.
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
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.
André Arnaud de Cal...
292,997
Super User 2025 Season 1
Martin Dráb
231,831
Most Valuable Professional
nmaenpaa
101,156
Moderator