locked
Update plugins getting fired on Assign Request? RRS feed

  • Question

  • Hi All,

    It is observed in some of our environments that plugins registered on the Update message are getting fired on Assign request. This is seen in both CRM 2015 online and on-premise. This behaviour doesn't seem to be documented anywhere in the SDK.

    The question is, if Update plugins are getting fired on Assign request, why are they having two events/messages in the first place? We can just use Update request to change the OwnerId of the entity rather than having to use the Assign request?

    Is this the expected behaviour (though it doesn't make much sense, if not at all)? Or is this a bug? Also, does the same apply for SetState request?

    Thanks,

    Nilhan


    Wednesday, September 16, 2015 5:47 AM

Answers

All replies

  • Hello,

    This is not expected behavior. The expected behavior is firing of plugin that handles Assign message. I would suggest to open ticket to get help from Microsoft side.


    Dynamics CRM MVP
    My blog

    Wednesday, September 16, 2015 6:09 AM
    Moderator
  • Thanks Andrii.

    In case if you misinterpreted my question or if I had missed it, Both Assign and Update events are getting fired on Assign request. E.g. when we assign an account to a different owner, plugins registered on both Assign and Update events are getting fired. We're only expecting to fire plugins registered on Assign event, right?

    Wednesday, September 16, 2015 6:43 AM
  • Thanks Andrii.

    In case if you misinterpreted my question or if I had missed it, Both Assign and Update events are getting fired on Assign request. E.g. when we assign an account to a different owner, plugins registered on both Assign and Update events are getting fired. We're only expecting to fire plugins registered on Assign event, right?


    I understood your question in the right way and I'm still with my suggestion - get in touch with MS Support.

    Dynamics CRM MVP
    My blog

    Wednesday, September 16, 2015 6:56 AM
    Moderator
  • remove owner from your update plugin attribute list.

    Hope this helps. ----------------------------------------------------------------------- Santosh Bhagat If this post answers your question, please click "Mark As Answer" on the post and "Vote as Helpful"

    Wednesday, September 16, 2015 11:40 AM
  • I spoke to a Microsoft folk and he insist it's the way CRM works. But unfortunately, I didn't get any sensible explanation why it works that way.

    Update event does get fired when explicit Assign request is executed, may be even SetState request as well. Architecturally speaking, this doesn't make any sense as to why the SDK has a segregation between Assign and Update events/requests. They should have at least deprecate the usage of Assign request since the new 2015 update 1 allow changing owner and status from Update request...

    https://community.dynamics.com/crm/b/crminogic/archive/2015/05/26/api-enhancement-service-update-message-in-crm-2015-update-1

    I believe most developers and users are unaware of this fact unless they come across with an issue. We faced a problem because we have a generic plugin that changes the owner of every record asynchronously as soon as they're created.

    The solution goes farther than just ignoring ownerid, in fact all security related attributes need to be filtered, as this post suggests...

    https://ameedsheikh.wordpress.com/2014/05/10/avoid-update-plugin-steps-triggering-during-assign-request/

    Or just kiss good bye to 'Assign'.


    Thursday, September 17, 2015 12:20 AM