locked
How to tell the difference in preUpdate plugin between Clicking Save button and Clicking Deactivate button RRS feed

  • Question

  • When I am editing preupdate event plugin, I want to add different logic based on the Actions triggered by Clicking Save or Clicking Deactivate. So which attribute could I use in the plugin context to differentiate it?


    Thanks

    David

    Friday, March 19, 2010 8:32 PM

Answers

  • Thank you, RhettClinton,

     

    I did a test, and the solution is very good.

     

    Regards,

    David

    Saturday, March 20, 2010 6:48 PM

All replies

  • Deactivate will use the SetState and  SetStateDynamic message not Update.

    If you use the same plugin for both messages then check the context.MessageName. It will equal Update or SetState or SetStateDynamic


    MSCRM Bing'd - http://bingsoft.wordpress.com
    Friday, March 19, 2010 10:43 PM
    Moderator
  • Thank you, RhettClinton,

     

    I did a test, and the solution is very good.

     

    Regards,

    David

    Saturday, March 20, 2010 6:48 PM