2
votes

I have two plugins (one a create pre-handler, the other an update post-handler). I built a plugins DLL from these two files using an snk, moved the dll onto the server bin and registered the two plugins with the registration tool and reset services. For some reason, the plugins are not firing...just to make sure it wasn't erroring out on any of my plugin code, I put the following line as the first piece of code in both plugins:

throw new InvalidPluginExecutionException("1");

Still, neither plugin fires and the create and update simply go through. Does anyone know if I'm missing anything here...

2
could you please give more info what kind of events they were registered - paramosh
If you are throwing an exception as the first line, it would suggest your registration is not correct. Could you post some screen caps showing your registration? - glosrob
I have an entity called bill payment - I registered a pre-create on this entity, as well as a post update on this entity. When I go and either create and save a new billpayment, or update an existing bill payment, it looks like the plugins are not firing. Both plugins have 'None' as the isolation mode and are being stored in the Database - user1603734
I also registered a step for each plugin, as well as a pre and post image for the update step. Still no luck with the plugins firing... - user1603734

2 Answers

3
votes

You could use CRMDiagTool to enable a trace on the CRM server to see if your plugins are generating any exceptions:

CRMDiagTool

On the Platform Tracing tab, select Application and Exception categories, click Enable Trace, perform the actions in CRM that you'd expect to trigger the plugin. Then click to Disable Trace, click Open Trace Directory and open the trace files generated. You may see an exception or some clue in the file as to the problem.

3
votes

Did you register them as sync or async? If async then check if your crm async service is working. Try registering them as sync and see when you press the save on your entity if it tskes longer, that might mean that the plugin is working.. Also please post print screen of the plugin registration