Plugin Stages – Pre Validation, Pre Operation and Post Operation

Hi,
 
Here is short description about the stages in Plugin.
 
Pre Validation – Plug-ins registered in this stage may execute outside the database transaction. Registered Plug-in run before the form is validated. It is useful if you want to implement business logic before the actual validation starts.  i.e., Changes made in plug-in won’t be saved if the validation of the main system plugins complain because the changes are outside the database transaction.
 
For example – Deletion cascades happen prior to pre-operation, therefore if you need any information about the child records, the delete plugin must be pre-validation.
 
Pre Operation – Plug-ins registered in this stage are executed within the database transaction. In simple words, After validation and before saving the values in database.
 
Post Operation – Plug-ins registered in this stage are executed within the database transaction. Plugin will run after the values have been inserted/changed on the database

For more information check this Stages, Stages Number and their use in CRM Plugins


Happy CRM’ing
Gopinath

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s