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 - 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: