Is there any way to find out if there was an MS CRM exception for the plugin?

As the title says, I’m looking for a way to tell about the difference between an error caused by my code or basic CRM functions and an error caused by any custom plugin that can be installed on the client system.

What we constantly become a victim of is our client custom third-party plugins, which they either created in the house or bought from another independent service provider. They register it on the CRM object that we touch or even on one of our own objects in the latter case. We are trying to do something, the plugin is trying to do its job and fails. In the last example, the plugin did not encode “correctly after we placed it in CRM. The plugin throws an error and CRM returns it to us.

How can I say that the plugin is the culprit without spending time investigating? So far, I have seen how one company simplified the task by dropping the trace of the plugin stack as an error message.

EDITING FOR BRIGHTNESS:

  • I am looking for a software solution to reduce the time it takes to identify the problem - this is a custom plugin, not our code interacting with their CRM from Azure.
  • I'm trying to improve the efficiency of error logging / error handling enough to tell the difference.
  • Even if our code works 100% but starts the synchronous plugin and this plugin fails, we get an exception from CRM.
  • All we do is software using the SDK.
+5
source share
4 answers

The only thing that comes to mind is to enable CRM tracking. The following link should explain how to do this in Microsoft Dynamics CRM.

http://support.microsoft.com/kb/907490

+2
source

, : enter image description here

, , , , , :

Unhandled Exception: System.ServiceModel.FaultException`1[[Microsoft.Xrm.Sdk.OrganizationServiceFault, Microsoft.Xrm.Sdk, Version=5.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]]: StupidPluginDetail: 
// ... other details
[StupidPlugin: StupidPlugin.ExamplePlugin]
[bda9ad85-c4a5-e211-bc00-78e7d162ee67: StupidPlugin.ExamplePlugin: Create of orderclose]
</TraceText>
</OrganizationServiceFault>
+1

Detail.TraceText , . , , , :

Mario.CRM.TestOrg.Plugins: Mario.CRM.TestOrg.Plugins.ContactPreUpdate

[5ee31a9e-3558-E211-adeb-00155d014401: Mario.CRM.TestOrg.Plugins.ContactPreUpdate: ]

try
{
  //create service proxy and call service
}
catch (Exception ex)
{
  Console.WriteLine(((System.ServiceModel.FaultException<Microsoft.Xrm.Sdk.OrganizationServiceFault>)(ex)).Detail.TraceText);
}
+1

This is not recommended for use in a production environment, but will be extremely useful for a testing environment. Whenever a CRUD operation is not performed using the SDK, you can programmatically disable all plugins and perform the same operation. If this succeeds, enable the plugins one at a time until it works. Then you can determine which plugin it calls, or is not a plugin at all.

0
source

All Articles