Skip to main content
Dynamics 365 general forum
Unanswered

API - Plugin is throwing an error - Developers?

editSubscribe (0) ShareShare
ReportReport
Posted on by UG Leader

A while back a Developer created a custom solution for us. They have since left and it is throwing errors when trying to run this process.

Having a hard time figuring7824.PluginTracelog.jpg out where to start even looking - I'm not a developer. Can someone maybe point me in the right direction?

Unhandled exception:
Exception type: System.ServiceModel.FaultException`1[Microsoft.Xrm.Sdk.OrganizationServiceFault]
Message: ISV code reduced the open transaction count. Custom plug-ins should not catch exceptions from OrganizationService calls and continue processing.Detail:
<OrganizationServiceFault xmlns:i="">www.w3.org/.../XMLSchema-instance" xmlns="">schemas.microsoft.com/.../Contracts">
<ActivityId>1127c9e1-4a11-4646-b82a-87032e374306</ActivityId>
<ErrorCode>-2146893812</ErrorCode>
<ErrorDetails xmlns:d2p1="">schemas.datacontract.org/.../System.Collections.Generic">
<KeyValuePairOfstringanyType>
<d2p1:key>ApiExceptionSourceKey</d2p1:key>
<d2p1:value xmlns:d4p1="">www.w3.org/.../XMLSchema" i:type="d4p1:string">Step/Microsoft.Crm.Extensibility.AsynchronousStep</d2p1:value>
</KeyValuePairOfstringanyType>
<KeyValuePairOfstringanyType>
<d2p1:key>ApiOriginalExceptionKey</d2p1:key>
<d2p1:value xmlns:d4p1="">www.w3.org/.../XMLSchema" i:type="d4p1:string">Microsoft.Crm.CrmException: ISV code reduced the open transaction count. Custom plug-ins should not catch exceptions from OrganizationService calls and continue processing.
at Microsoft.Crm.BusinessEntities.ExecutionContext.ThrowIfInvalidPluginTransaction(Int32 countThreshold)
at Microsoft.Crm.BusinessEntities.ExecutionContext.CommitTransaction(ProcessDependenciesOption option, FlushCacheOption flushOption)
at Microsoft.Crm.Extensibility.MessageProcessor.Execute(PipelineExecutionContext context)
at Microsoft.Crm.Extensibility.InternalMessageDispatcher.Execute(PipelineExecutionContext context)
at Microsoft.Crm.Extensibility.ExtensiblePlatformMessageDispatcher.Execute(PipelineExecutionContext pluginContext)
at Microsoft.Crm.Extensibility.ExtensiblePlatformMessageDispatcher.CreateWithInvocationSource(BusinessEntity entity, Int32 invocationSource, ExecutionContext context)
at Microsoft.Crm.BusinessEntities.BusinessProcessObject.&lt;&gt;c__DisplayClass224_0.&lt;Create&gt;b__0()
at Microsoft.PowerApps.CoreFramework.ActivityLoggerExtensions.Execute[TResult](ILogger logger, EventId eventId, ActivityType activityType, Func`1 func, IEnumerable`1 additionalCustomProperties)
at Microsoft.Xrm.Telemetry.XrmTelemetryExtensions.Execute[TResult](ILogger logger, XrmTelemetryActivityType activityType, Func`1 func)
at Microsoft.Crm.ObjectModel.AsyncOperationServiceInternal`1.Create(IBusinessEntity asyncOperation, ExecutionContext context, Boolean doPrivilegeCheck)
at Microsoft.Crm.ObjectModel.AsyncQueue.&lt;&gt;c__DisplayClass0_0.&lt;Enqueue&gt;b__0()
at Microsoft.PowerApps.CoreFramework.ActivityLoggerExtensions.Execute[TResult](ILogger logger, EventId eventId, ActivityType activityType, Func`1 func, IEnumerable`1 additionalCustomProperties)
at Microsoft.Xrm.Telemetry.XrmTelemetryExtensions.Execute[TResult](ILogger logger, XrmTelemetryActivityType activityType, Func`1 func)
at Microsoft.Crm.ObjectModel.AsyncQueue.Enqueue(AsyncRequest request, ExecutionContext context)
at Microsoft.Crm.Extensibility.AsynchronousStep.RouteToAsyncService(PipelineExecutionContext context)
at Microsoft.Crm.Extensibility.AsynchronousStep.Execute(PipelineExecutionContext context)
at Microsoft.Crm.Extensibility.SystemUserProxy.Execute(PipelineExecutionContext context)
at Microsoft.Crm.Extensibility.PipelineInstrumentationHelper.Execute(Boolean instrumentationEnabled, String stopwatchName, ExecuteWithInstrumentation action, PipelineExecutionContext context)
at Microsoft.Crm.Extensibility.Pipeline.&lt;&gt;c__DisplayClass6_0.&lt;RunStep&gt;b__0()</d2p1:value>
</KeyValuePairOfstringanyType>
<KeyValuePairOfstringanyType>
<d2p1:key>ApiStepKey</d2p1:key>
<d2p1:value xmlns:d4p1="">www.w3.org/.../XMLSchema" i:type="d4p1:string">7c72a20f-873a-e911-a975-000d3a18c732</d2p1:value>
</KeyValuePairOfstringanyType>
<KeyValuePairOfstringanyType>
<d2p1:key>ApiDepthKey</d2p1:key>
<d2p1:value xmlns:d4p1="">www.w3.org/.../XMLSchema" i:type="d4p1:string">3</d2p1:value>
</KeyValuePairOfstringanyType>
<KeyValuePairOfstringanyType>
<d2p1:key>ApiActivityIdKey</d2p1:key>
<d2p1:value xmlns:d4p1="">www.w3.org/.../XMLSchema" i:type="d4p1:string">1127c9e1-4a11-4646-b82a-87032e374306</d2p1:value>
</KeyValuePairOfstringanyType>
<KeyValuePairOfstringanyType>
<d2p1:key>ApiPluginSolutionNameKey</d2p1:key>
<d2p1:value xmlns:d4p1="">www.w3.org/.../XMLSchema" i:type="d4p1:string">System</d2p1:value>
</KeyValuePairOfstringanyType>
<KeyValuePairOfstringanyType>
<d2p1:key>ApiStepSolutionNameKey</d2p1:key>
<d2p1:value xmlns:d4p1="">www.w3.org/.../XMLSchema" i:type="d4p1:string">System</d2p1:value>
</KeyValuePairOfstringanyType>
<KeyValuePairOfstringanyType>
<d2p1:key>ApiExceptionCategory</d2p1:key>
<d2p1:value xmlns:d4p1="">www.w3.org/.../XMLSchema" i:type="d4p1:string">ClientError</d2p1:value>
</KeyValuePairOfstringanyType>
<KeyValuePairOfstringanyType>
<d2p1:key>ApiExceptionMesageName</d2p1:key>
<d2p1:value xmlns:d4p1="">www.w3.org/.../XMLSchema" i:type="d4p1:string">IsvTransactionCount</d2p1:value>
</KeyValuePairOfstringanyType>
<KeyValuePairOfstringanyType>
<d2p1:key>ApiExceptionHttpStatusCode</d2p1:key>
<d2p1:value xmlns:d4p1="">www.w3.org/.../XMLSchema" i:type="d4p1:string">400</d2p1:value>
</KeyValuePairOfstringanyType>
</ErrorDetails>
<HelpLink>go.microsoft.com/.../
<Message>ISV code reduced the open transaction count. Custom plug-ins should not catch exceptions from OrganizationService calls and continue processing.</Message>
<Timestamp>2021-02-11T18:40:33</Timestamp>
<ExceptionRetriable>false</ExceptionRetriable>
<ExceptionSource>SdkClientError</ExceptionSource>
<InnerFault i:nil="true" />
<OriginalException>SdkClientError</OriginalException>
<TraceText i:nil="true" />
</OrganizationServiceFault>

  • Community Member Profile Picture
    Community Member UG Leader on at
    RE: API - Plugin is throwing an error - Developers?

    Thank you so much for your insights. I understand your findings and will proceed with the steps you outlined. If I may ask - what path did you take to learn about this? I'd like to get more familiar. Can you recommend a book or class or youtube site? Thanks so much Kokulan!!

  • Guido Preite Profile Picture
    Guido Preite 53,906 Super User on at
    RE: API - Plugin is throwing an error - Developers?

    without the plugin code would be difficult to understand the real issue, the error just show that an IOrganizationService operation is under a try/catch block

  • Kokulan Profile Picture
    Kokulan 18,044 on at
    RE: API - Plugin is throwing an error - Developers?

    Hi

    It looks like the custom solution created by the developer performs an operation like Update, and that update is failing.  Since the exception is being swallowed by the custom code, the platform level exception handling mechanism complaints about error being supressed.. The above message does not have the details about actual reason for the fail.

    If you have access to code, you could update it to allow it to throw exception and deploy the code again.

    If you do not have access to code, the first thing you could try is to enable plugin trace and see if it logs more details like trace from custom code.

    If you are familiar with the plugin registration tool, you can also use that to disable the offending plugin and see everything else works fine so that you can isolate the issue.

    Also , have look at the following link

    www.crmanswers.net/.../custom-plug-ins-should-not-catch-exceptions.html

Helpful resources

Quick Links

What Motivates a Super User?

We know many of you visit the Dynamics 365 Community and Power Platform…

Demystifying Copilot with Georg Glantschnig…

Industry experts answer burning questions directly from our amazing Community…

Setting Up Knowledge Sources for Copilot…

Look at how configuring a comprehensive knowledge base is crucial…

Leaderboard

#1
Andre Arnaud de Calavon Profile Picture

Andre Arnaud de Cal... 283,066 Super User

#2
Martin Dráb Profile Picture

Martin Dráb 222,585 Super User

#3
nmaenpaa Profile Picture

nmaenpaa 101,138

Product updates

Dynamics 365 release plans