Monday 7 December 2015

Stages, Stages Number and their use in CRM Plugins

Hi,

Sometimes we might get the chance to use only one Plugin on different and it would have separate business logic to perform on different stages.

Here is the table which shows the associated stage number with the stage name and the event.
EventStage NameStage NumberDescription
Pre-Event
Pre-validation10Stage in the pipeline for plug-ins that are to execute before the main system operation. Plug-ins registered in this stage may execute outside the database transaction.
Pre-EventPre-operation20Stage in the pipeline for plug-ins that are to execute before the main system operation. Plug-ins registered in this stage are executed within the database transaction.
Post-EventPost-operation40Stage in the pipeline for plug-ins which are to execute after the main operation. Plug-ins registered in this stage are executed within the database transaction.

We can use this numbers as conditions in the plugin as shown below.

You might be thinking why 30 is missing in the middle. We do have 30 but it is for main operation which we cannot use in the custom plugins.

Platform Core OperationMain Operation30In-transaction main operation of the system, such as create, update, delete, and so on. No custom plug-ins can be registered in this stage. For internal use only.

Hope this helps.

--
Happy CRM'ing

Gopinath

No comments:

Post a Comment