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

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

Transaction error on creation of custom entity using ExecuteTransactionRequest

(0) ShareShare
ReportReport
Posted on by 5

Hi, I am trying to get around the creation of a custom entity in a transaction by using the sample helperCode/CrmServiceHelpers.cs to connect to CRM. The idea is to run the code to setup CRM.

Server: Dynamics CRM 2016 8.0.0.1094
Solution: Microsoft.CrmSdk.CoreAssemblies 8.0.2.1

I can connect successfully to the server however it returns:

The application terminated with an error.

Timestamp: 07/04/2017 14:39:19

Code: -2147220989

Message: You cannot start a transaction with a different isolation level than is already set on the current transaction

Plugin Trace: Inner

Fault: Has Inner Fault

Could someone help me out. Thanks.

Here is the code:
gist.github.com/.../1de73de3c285fd7daa8f36cff432f36b

*This post is locked for comments

I have the same question (0)
  • David Jennaway Profile Picture
    14,065 on at
    RE: Transaction error on creation of custom entity using ExecuteTransactionRequest

    Metadata modifications (creating or modifying entities or attributes) are performed in a different SQL isolation level from data operations.

    If your plugin runs synchronously, it will run in the context of the originating transaction, which causes this error. A simple solution is to set your plugin to run asynchronously

  • hugdru Profile Picture
    5 on at
    RE: Transaction error on creation of custom entity using ExecuteTransactionRequest

    Thanks. This code is not a plugin, it is a console application. The main idea of this code is to create custom entities and its attributes. Only meta stuff. Sorry I am very green (college student with almost no experience in the dynamics world).

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…

Abhilash Warrier – Community Spotlight

We are honored to recognize Abhilash Warrier as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
HR-09070029-0 Profile Picture

HR-09070029-0 2

#1
UllrSki Profile Picture

UllrSki 2

#3
ED-30091530-0 Profile Picture

ED-30091530-0 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans