10
votes

I have been struggling with a an error in a plugin for MS Dynamics CRM Online. (see below). It appears to happen at random times, but more likely to occur when the activity is high. I have verified and there are no try/catch-continue issues as the exception suggests. And that there are no member references to the OrganizationService Kept as this post suggests:

https://community.dynamics.com/crm/f/117/t/138785.aspx

Does anyone know what is causing the issue, or how to get around it?

<OrganizationServiceFault xmlns:i="http://www.w3.org/2001/XMLSchema-instance"     xmlns="http://schemas.microsoft.com/xrm/2011/Contracts">
  <ErrorCode>-2147220911</ErrorCode>
  <ErrorDetails xmlns:d2p1="http://schemas.datacontract.org/2004/07/System.Collections.Generic" />
  <Message>There is no active transaction. This error is usually caused by custom plug-ins that ignore errors from service calls and continue processing.</Message>
  <Timestamp>2014-09-10T00:30:02.6905225Z</Timestamp>
  <InnerFault>
    <ErrorCode>-2147220911</ErrorCode>
    <ErrorDetails xmlns:d3p1="http://schemas.datacontract.org/2004/07/System.Collections.Generic" />
    <Message>There is no active transaction. This error is usually caused by custom plug-ins that ignore errors from service calls and continue processing.</Message>
    <Timestamp>2014-09-10T00:30:02.6905225Z</Timestamp>
    <InnerFault i:nil="true" />
    <TraceText i:nil="true" />
  </InnerFault>
<TraceText>
2
Any chance you could post the code from the plugin that is getting fired? Also, can you confirm that this plugin wouldn't be causing any additional plugins/real-time workflows to be triggered?BlueSam
I'm not sure I can post the code, company policy. But my plugin reads an email and creates a case. Case creation will trigger other plugins.tobias
I might look into the possibility of a try/catch-continue scenario in the plugins that are triggered. Can you confirm this isn't the case?BlueSam
Yes, that was the first thing I checked :(tobias

2 Answers

12
votes

BlueSam was really close, it turns out it was not our plugins that were causing the issue, it was Microsoft's ActivityFeeds plugins.

After disabling the ActivityFeeds.Plugins.CaseCreate: Create of case for account and Create of case for contact, we have not gotten any more "There is no active transaction" issues.

I hope this helps someone.

1
votes

I was receiving this same error in CRM online 2015.1. After much pulling of hair and gnashing of teeth, I was finally able to figure out every single plugin step for the Activity Feeds Plugin had been duplicated. I removed all duplicates and the issue resolved itself.