Mark T
Mark T

Reputation: 190

There is no active transaction. This error is usually caused by custom plug-ins that ignore errors from service calls and continue processing

We've recently bumped up against this issue during our tests (CRM 2015 Update 0.1). There are plenty of answers online that mention that this error is prevented by disabling Activity Feed Rules and that has worked work us. However, I want to know how and why this issue occurred and what we can do to prevent it without disabling the rules.

When creating a Case, we have a synchronous workflow running that creates and associates a related record (N:1) and on create of that record, populates a value back on the Case.

When the Case is saved, the error mentioned above is shown. The weird thing is that this won't occur when opening a new Case form and filling in the required details and saving. But, when I'm on a Contact there's a subgrid for related Cases based on a custom relationship. When creating a Case through that subgrid and saving, the error occurs.

I've racked my brain trying to think what could possibly be tripping out the Activity Feeds. I've taken a look into the assemblies with ILSpy and the logic doesn't exactly seem complicated and the data I'm providing doesn't look like it would cause an exception. What's also strange is that this occurs on our Managed Test/Production environments, but not our Unmanaged Development environment.

Where should I go from here? Is there another cause that I haven't thought of or is the correct fix in this instance to always just disable the Activity Feed rule and forget about it?

Upvotes: 3

Views: 7219

Answers (2)

Naveed Anwar
Naveed Anwar

Reputation: 186

I got the same error when running the custom workflow with the ordinary user but it was running fine with the user having admin privileges.

I just converted the workflow from "real-time" to "background" workflow and then it is working fine.

I thought may be it will helpful as an extra step for the users getting same error.

Upvotes: 0

Henk van Boeijen
Henk van Boeijen

Reputation: 7918

Create a plugin and register a synchronous pre validation stage step on the create message for entity incident. In this plugin create the associated record and add an EntityReference for it to the incident entity's attributes collection. (You will find it as the Target property in the InputParameters collection.

This will provide a much more stable solution.

Upvotes: 1

Related Questions