Sunday, May 15, 2016

Difference between Pre-operation and Post Operation when do we go for pre operation,pre operation will work on retrieve?


Is Pre operation will work on Retrieve, create, update then why post operation? post operation will also work crud. then why pre operation. could you plz anybody clarify me





Pre-operation: pipeline for plug-ins that are to execute before the main system operation.
Post-operation:
pipeline for plug-ins which are to execute after the main operation.:
For Example: Pre-Operation
Suppose we have a Business Requirement that Reports in CRM should not be deleted after they are sent.
So We will write a Plugin to be registered on Pre-Operation and check for the Send Date Time if it is a Sent Report we will throw an Exception with a message that unable to delete this report. So our plugin executes before the main Operation to prevent the delete.
For Example: Post-Operation
Suppose we have some entities like Accountthat we want to Synchronize with some External System. The we will write a Plug-in to be registered on Post-Operation and Send some notification/Data to the external System that we want to Sync

No comments:

Post a Comment