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 :
Customer experience | Sales, Customer Insights,...
Suggested answer

Transaction not started

(0) ShareShare
ReportReport
Posted on by 10

Hi all,
I have registered a plugin successfully and working successfully on some entities like product and tasks but not working on account and contact.
The following error is getting when creating a new record.
Transaction not started

I have the same question (0)
  • Suggested answer
    Kipetcoff Profile Picture
    1,037 on at
    RE: Transaction not started

    Hi,

    Here is the similar topic https://community.dynamics.com/crm/f/microsoft-dynamics-crm-forum/294879/transaction-not-started-when-saving-record 

    Please check permissions on your entity and exceptions inside try catch

  • Akramdots Profile Picture
    10 on at
    RE: Transaction not started

    Thanks  Andrey for replay,

    I  have  system administrator role in online CRM and have all permissions for both account and contact entities and enabled plugin trace log in CRM and got following error:

    Unhandled exception:

    Exception type: System.ServiceModel.FaultException`1[Microsoft.Xrm.Sdk.OrganizationServiceFault]

    Message: An unexpected error occurred from ISV code. (ErrorType = ClientError) Unexpected exception from plug-in (Execute): Plugins.AssignAutoNumberPlugin: System.NullReferenceException: Object reference not set to an instance of an object.Detail:

    <OrganizationServiceFault xmlns:i="www.w3.org/.../XMLSchema-instance" xmlns="schemas.microsoft.com/.../Contracts">

    <ActivityId>e8fb57d4-0616-4d16-a478-fd590d07805f</ActivityId>

    <ErrorCode>-2147220956</ErrorCode>

    <ErrorDetails xmlns:d2p1="schemas.datacontract.org/.../System.Collections.Generic" />

    <HelpLink i:nil="true" />

    <Message>An unexpected error occurred from ISV code. (ErrorType = ClientError) Unexpected exception from plug-in (Execute): Plugins.AssignAutoNumberPlugin: System.NullReferenceException: Object reference not set to an instance of an object.</Message>

    <Timestamp>2019-10-16T09:42:20.2082345Z</Timestamp>

    <ExceptionRetriable>false</ExceptionRetriable>

    <ExceptionSource>PluginExecution</ExceptionSource>

    <InnerFault i:nil="true" />

    <OriginalException>System.NullReferenceException

    at Plugins.AssignAutoNumberPlugin.Execute(IServiceProvider serviceProvider)

    at Microsoft.Crm.Sandbox.SandboxAppDomainHelper.<>c__DisplayClass14_3.<Execute>b__0()

    --- End of stack trace from previous location where exception was thrown ---

    at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()

    at Microsoft.Crm.Sandbox.SandboxAppDomainHelper.Execute(IOrganizationServiceFactory organizationServiceFactory, Dictionary`2 sandboxServices, String pluginTypeName, String pluginConfiguration, String pluginSecureConfig, IPluginExecutionContext requestContext, Boolean enablePluginStackTrace, Boolean chaosFailAppDomain, String crashOnPluginExceptionMessage)

    at Microsoft.Crm.Sandbox.SandboxAppDomainHelper.Execute(IOrganizationServiceFactory organizationServiceFactory, Dictionary`2 sandboxServices, String pluginTypeName, String pluginConfiguration, String pluginSecureConfig, IPluginExecutionContext requestContext, Boolean enablePluginStackTrace, Boolean chaosFailAppDomain, String crashOnPluginExceptionMessage)

    at Microsoft.Crm.Sandbox.SandboxWorker.<>c__DisplayClass3_0.<Execute>b__0()</OriginalException>

    <TraceText i:nil="true" />

    </OrganizationServiceFault>

  • Suggested answer
    Kipetcoff Profile Picture
    1,037 on at
    RE: Transaction not started

    Looks like you have a reference error in AssignAutoNumberPlugin. It may happens when you try to get property of object that is NULL. For example var number = "000"+entity.Id.ToStrinh(); entity or entity.Id is NULL and everything is crashes. Check you code. You forgot to retrieve some properties for numbering

  • Akramdots Profile Picture
    10 on at
    RE: Transaction not started

    Thanks again for reply,

    This error is occurred  on specific entities. I created unit test case and debug plug-in is working and does not show any error.

  • Kipetcoff Profile Picture
    1,037 on at
    RE: Transaction not started

    Could yo share plugin code?

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 > Customer experience | Sales, Customer Insights, CRM

#1
Rishabh Kanaskar Profile Picture

Rishabh Kanaskar 159

#2
MVP-Daniyal Khaleel Profile Picture

MVP-Daniyal Khaleel 152

#3
Tom_Gioielli Profile Picture

Tom_Gioielli 134 Super User 2025 Season 2

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans