locked
Plugin Registration Tool: Message for deactivating an account RRS feed

  • Question

  • On the account form (i.e. the datagrid of the accounts) I can select an account --> go to "More Actions" --> click "Deactivate".  This will deactivate the account.
    I am looking to do some specific actions when an account is deactivated.
    I have found a few posts of similar topic and tried them but couldn't get the event to go to the plugin as I was hoping to debug and see if the call was actually being made.  There was one reference that said to use the message of "Close" for deactivating a custom entity but that won't work because the account entity is not available for that message.  I also thought it may have been an update message that would require me to do some additional code to see if the status was changed but that didn't call the plug in either.

    Are there any suggestions on what the message should be that would fire the plugin event when the account is deactivated?
    Thanks!

    Wednesday, October 14, 2009 3:46 AM

Answers

  • You can capture Activation / DeAcivation by writing a plugin that listen to SetState/SetStateDynamicEntity message. Try searching in this direction.
    • Proposed as answer by Santosh Kore Wednesday, October 14, 2009 4:50 AM
    • Marked as answer by GreenWasabi Wednesday, October 14, 2009 4:42 PM
    Wednesday, October 14, 2009 4:50 AM

All replies

  • You can capture Activation / DeAcivation by writing a plugin that listen to SetState/SetStateDynamicEntity message. Try searching in this direction.
    • Proposed as answer by Santosh Kore Wednesday, October 14, 2009 4:50 AM
    • Marked as answer by GreenWasabi Wednesday, October 14, 2009 4:42 PM
    Wednesday, October 14, 2009 4:50 AM
  • I believe you would have to use the setstate message to catch it when it is deactivated.
    Wednesday, October 14, 2009 4:55 AM
  • Thanks Santosh and MSCRM Blogger. That solved it. I then used the moniker to get the account GUID.

    Excellent. Thanks for the help!

    Wednesday, October 14, 2009 4:43 PM
  • You are welcome.
    Wednesday, October 14, 2009 10:25 PM