web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

prevalidation stage for plugin execution

(0) ShareShare
ReportReport
Posted on by

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

I have the same question (0)
  • Verified answer
    Shahbaaz Ansari Profile Picture
    6,211 on at

    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

  • Verified answer
    ashlega Profile Picture
    34,477 on at

    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)

  • Verified answer
    gdas Profile Picture
    50,091 Moderator on at

    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.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
SA-08121319-0 Profile Picture

SA-08121319-0 4

#1
Calum MacFarlane Profile Picture

Calum MacFarlane 4

#3
Alex Fun Wei Jie Profile Picture

Alex Fun Wei Jie 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans