web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics 365 | Integration, Dataverse...
Unanswered

API - Plugin is throwing an error - Developers?

(0) ShareShare
ReportReport
Posted on by

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>

I have the same question (0)
  • Kokulan Profile Picture
    18,054 on at

    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

  • Guido Preite Profile Picture
    54,086 Moderator on at

    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

  • Community Member Profile Picture
    on at

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

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > Microsoft Dynamics 365 | Integration, Dataverse, and general topics

#1
Siv Sagar Profile Picture

Siv Sagar 93 Super User 2025 Season 2

#2
#ManoVerse Profile Picture

#ManoVerse 76

#3
Martin Dráb Profile Picture

Martin Dráb 64 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans