Wednesday, 4 June 2008

Steps to isolate why a plugin is not firing

Hi,

This list is more for myself, but other people may benefit from it too. I am compiling a list of steps to go through if a plugin is not firing. This really only covers problems with your assembly being loaded, if the plugin does actually execute some of your code then this will not help you. This list will grow in time as more common pitfalls are uncovered. So check back regularly.

1. Is the assembly signed?

2. Does the assembly reference an external assembly (perhaps an assembly that stores all your common code)? If this is the case, the 2 (or more) assemblies needs to be merged using IL Merge. George wrote an extensive explanation of this here http://crm.georged.id.au/post/2008/02/22/Packaging-plugins.aspx.

3. In the plugin registration tool, did you misspell the step message and entity?

4. Are you trying to reference a pre-image on Create or a post-image on Delete? Neither of these will be accessible and your plugin will fail before it even tries to execute any code.

5. Did you install the assembly to disk? If so you need to make sure you copy the assembly to the assembly\bin directory. The assembly gets loaded from this location every time it is initialized if it is installed to disk.

6. Is this crm server an upgrade form CRM3 to CRM4 or are you still using CRM3 style callouts? It seems that old style callouts get called before plugins, so ensure that there are not any failing callouts in the assembly\bin\callout.config file.

That's it for now, more to follow

Thanks
Bossie

No comments: