This project extends the Plugindeveloper tool supplied in the CRM SDK v.4.0.4 to allow easy registration of a plugin for multiple messages and/or entities.
It uses the sdkmessagefilter class to retrieve all valid message and entity combinations, and uses a BulkStep element within the register.xml file to specify which of these combinations to use. The main additional code is in the new file MessageFilter.cs, and the construtor of the Solution class has been modified to use the new MessageFilter class.
A few additional modifications to the Plugindeveloper tool have been included:
- Set the Timeout on the web service proxy calls to 20 miuntes, so as to allow for the extended processing time when registering for a large number of messages
- Allow the tool to connect to CRM using the current credentials if the UserName is not specified in register.xml
- Allow plugins to be registered in the file system by setting the pluginassembly.path property
All these modifications have been commented with: // DJ
The full solution has been built with web references to a CRM server at http://CRM that uses Active Directory authentication. This tool can be used in conjuction with the PluginLogger tool here http://code.msdn.microsoft.com/crm40pluginlogger to track all plugin events.
Kudos to David Jennaway.