Plugin on User/Team assign RRS feed

  • Question

  • Hi All,

    I want to update User entity field e.g. Middle Name with "XYZ" when I assign "ABC" Team to user or when I add user to "ABC" team.

    Which is the best method to do this. Can I write plugin on this with which message? I need to write plugin on both team and user?

    Please share your thoughts.



    Thursday, January 16, 2014 3:55 PM

All replies

  • It can be done by using Associate message in Plugin. But the problem is this plugin will  fire for all N:N relationship not for only Team and user.




    Thursday, January 16, 2014 4:52 PM
  • Hi,

    I guess you've found the solution by yourself.

    Just some note, there's Assign Plugin Message too and it's specified for each entity so use it instead of Associate Message.

    If you need to use Associate Message, then in the plugin you must provide criteria so that the main business rule only rune with expected entity.

    Hope it helps.

    Friday, January 17, 2014 7:46 AM
  • Just to clarify, the Associate message is the one you want (Assign is used to change ownership, and is not relevant to this scenario). In your code you'll need to check that the Relationship InputParameter is the

    teammembership_association relationship

    Microsoft CRM MVP - http://mscrmuk.blogspot.com  http://www.excitation.co.uk

    Friday, January 17, 2014 8:25 AM