Saturday, April 21, 2012

MS CRM 2011: Adding users to Team: Handling with plugins

Several times I have read that other developers were not able to handle event of adding users to teams with their plugins. I didn’t have any time for experiments till time I have got task to develop similar plugin.
I have found following post at SDK - http://technet.microsoft.com/en-us/library/gg328576.aspx which pointed me to document from SDK package - SDK\Tools\Message-entity support for plug-ins.xlsx. Here are messages that available for handling with filter taken by entity – team:

I have tried to register my plugin using options provided at following screen:

I spent some time with it and realized that it doesn’t work. The way out is to handle Associate message when users are added and Disassociate when users are removed from team. So proper registration of plugin is:

After I registered plugin to handle Associate message I was able to debug plugin. Following screenshot shows how InputParameters look like:

2 comments:

  1. Just in case somebody will want to know: If you registered plugin on AddMembers message, the plugin will be triggered only when you add user to a team using "Join Teams" button from system user form.

    ReplyDelete