Plugins have been around a long time in Dynamics and you either love them or strongly dislike them.
There isn’t much in between.
In working through a few issues on a recent project I had to build a plugin to tap into some many-2-many relationship joins.
If you are looking to solve a similar problem here are some links to get your started.
In working on this problem I had to do a little more debugging in my plugins and was surprised to see the changes that have come in the Plugin Registration Tool.
To walk through your plugin’s execution, follow these steps.
- Register your plugin.
- If you have not already done it, Install the Plugin Profiler from the Plugin Registration Tool.
- Before going back to Dynamics, Start the Plugin Profiler.
- Select your profile storage method (I left as recommended).
- Now validate your code in Dynamics. Upon completion you will be prompted with a file to download, save it.
- Now click on the “Replay Plug-In Execution” button at the top of the plugin tool. The following window will appear where you will associate your downloaded plugin file and plugin. Also note, that the tool tells you what PID (Process Id) the system is running as which will allow you to attach your Visual Studio process to, to walk through your code.
When you are ready, click “Start Execution”.
- When executing you will see output akin to the following (where in my case the name of my plugin is called RecipientHandler.
This is a much easier, straight-forward and simpler way to debug plugins. The step-through is great as you can then configure breakpoints in your code to see what Input/Output parameters you are working with and eliminate much of the guesswork.