2

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

user1603734
  • 1,071
  • 2
  • 10
  • 15
  • 2
    could you please give more info what kind of events they were registered – paramosh Mar 15 '13 at 15:53
  • 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 Mar 15 '13 at 16:16
  • 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 Mar 15 '13 at 16:29
  • 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 Mar 15 '13 at 18:06

2 Answers2

3

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.

Col
  • 656
  • 1
  • 6
  • 18
  • Thanks, I didn't see anything in the trace file about any plugin errors or anything relevant. Judging from the trace file it looks like the plugin wasn't even fired... – user1603734 Mar 15 '13 at 16:22
  • As paramosh says, can you supply more information on what events you are triggering on and what you are doing to trigger them – Col Mar 15 '13 at 16:24
  • 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 Mar 15 '13 at 16:35
3

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

Greg Oks
  • 2,700
  • 4
  • 35
  • 41