Notifications
Announcements
No record found.
Hi,
When to use prevalidation execution stage for plugin ?If anybody has used it then pls share the code and scenario?
*This post is locked for comments
Hi Purnima,
Pre-Validation: is before the record even reaching the stage of pre-operation,
so means not yet saved, it is the first layer,usually used for validation, but not many people use this, usually will just use pre-operation.
Please check below example how to use pre validation stage.
www.inogic.com/.../plugin-pre-validation-operation-to-show-an-error-message-as-well-as-log-the-error
Thanks,
Shahbaaz
Check this - there is a nice explanation:
stackoverflow.com/.../when-would-i-register-a-crm-2011-online-plugin-for-pre-validation-stage
I believe 3 things to consider are:
- Pre-validation runs outside of the main transaction (you can do CRUD operations there, and they won't rollback if an error happens after)
- Security checks happen after pre-validation
- Cascade operations happen after pre-validation (but, possibly, before pre-operation)
Hi Purnima ,
There may be many scenario you can use pre-validation messages. But two things you need to remember when you are going to implement pre-validation plugin.
Plugin in Pre-validation does not join the database transaction, that means whatever you are doing in pre-validation it will not going to rollback if any error happen in the other stage of the plugin.So be careful when you are using pre-validation operation.
Secondly Pre-validation does no check any security access so it might be happen you want to retrieve some records which you don't have permission but you retrieved to validate .
In summary I can say pre-validation you can use when you really need only validation purpose not for main operation.
Hope this helps.
Under review
Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.
As AI tools become more common, we’re introducing a Responsible AI Use…
We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…
These are the community rock stars!
Stay up to date on forum activity by subscribing.
SA-08121319-0 4
Calum MacFarlane 4
Alex Fun Wei Jie 2