Plugin Diff Pre-validation, pre- operation, post-operation stages

Pre- validation means your plugin will run before the form is validated.

Pre- operation is after validation and before the values are saved to the database.

Post- operation is your plugin will run after the values have been inserted or changed on the database.


Realtime example :



saved, it is the first layer, usually used for validation, but not many people use this, usually will just use pre-operation.

2. Pre-Operation: is also before the record created, not yet database transaction committed.

This is usually used to modify attribute value by system (logic code), validation as well.

Any changes of attribute in the pre-validation would be dismissed if you modify the attribute from this stage.

Since mentioned before, this is not yet created, so, there is no ID created at this point.

3. Post-Operation: is after the record created, database transaction committed, and you would get the GUID.

You cant change the value of the record in this stage since already committed, but you can take next action, what's next you do for this record or another action.

Example: Want to assign this record to another owner (reason why you put on Post is because you need GUID), share to another team, send email as notification, create task or anything you need reference to this record, because you need this record created first.

 

Comments

Popular posts from this blog

Power Automate compose vs variable

Update record when checkbox checked using JavaScript and save d365

Power pages custom button add in gried