none
Pre-Validation, Pre-Operation, Post-Operation in MS CRM 2011

    Question

  • Hi,

    What is the difference between Pre-Validation, Pre-Operation, Post-Operation in MS CRM 2011 ?

     

    Thanks,

    Srikanth Reddy

    Wednesday, December 14, 2011 2:45 PM

Answers

  • Pre validation means you 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/changed on the database

     

     

    if it helped you please mark it as the answer


    Ben Hosking
    Check out my CRM Blog
    Linked-In Profile
    Follow Me on Twitter!
    • Proposed as answer by D kay Wednesday, December 14, 2011 3:00 PM
    • Marked as answer by JLattimerMVP, Moderator Friday, December 07, 2012 2:27 AM
    Wednesday, December 14, 2011 2:50 PM

All replies

  • Pre validation means you 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/changed on the database

     

     

    if it helped you please mark it as the answer


    Ben Hosking
    Check out my CRM Blog
    Linked-In Profile
    Follow Me on Twitter!
    • Proposed as answer by D kay Wednesday, December 14, 2011 3:00 PM
    • Marked as answer by JLattimerMVP, Moderator Friday, December 07, 2012 2:27 AM
    Wednesday, December 14, 2011 2:50 PM
  • Hi,

     

    Can you give me the example on Pre-validation and Pre-Operation ? here I am confusing.

     

    Thanks,

    Srikanth Reddy

    Wednesday, December 14, 2011 5:14 PM
  • Examples

     

    Pre Validation

    You may want to do some calculations on an order form when it is saved.  You could calculate the tax on the order and would do this in a plugin before the validation kicks in.  What this means is the changes made here won't be saved if the validation of the main system plugins complain because the changes are outside the database transaction.

     

    Pre Operation

    The next stage in the pipeline after the pre validation stage but before the main system operations.

    I have found this blog page explains 

    http://mscrmtools.blogspot.com/2011/01/crm-2011-plugins-welcome-to.html

    Event   Stage Name Stage Number Description
    Pre-Event Pre-validation 10 Stage 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-Event Pre-operation 20 Stage 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-Event Post-operation 40 Stage 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.
    Post-Event Post-operation 50 Stage in the pipeline for plug-ins which are to execute after the main operation. Plug-ins registered in this stage may execute outside the database transaction. This stage only supports Microsoft Dynamics CRM 4.0 based plug-ins.

    Ben Hosking
    Check out my CRM Blog
    Linked-In Profile
    Follow Me on Twitter!
    Wednesday, December 14, 2011 5:52 PM