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,...
Answered

Error assigning user on specific account record

(0) ShareShare
ReportReport
Posted on by 40

Hello

I am receiving an error when trying to assign or change ownership on a single account record.   I have set the current assignee and any prospect owner to System Admin to ensure it isn't permission based. The entity is pretty default I believe. 

I have searched for duplicate accounts and can find none.  I have checked against this previous and simllar support question
https://community.dynamics.com/365/sales/f/dynamics-365-for-sales-forum/311942/cannot-insert-duplicate-key-when-i-try-to-reassign-accounts/905102

Any help appreciated.

pastedimage1577985582803v1.png

System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. --->

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

Cannot insert duplicate key. Server stack trace: at System.ServiceModel.Channels.ServiceChannel.HandleReply(ProxyOperationRuntime operation,

ProxyRpc& rpc) at System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs,

TimeSpan timeout) at System.ServiceModel.Channels.ServiceChannelProxy.InvokeService(IMethodCallMessage methodCall,

ProxyOperationRuntime operation) at System.ServiceModel.Channels.ServiceChannelProxy.Invoke(IMessage message)

Exception rethrown at [0]: at Microsoft.Crm.Sandbox.SandboxOrganizationService.Execute(String operation, Byte[] serializedRequest,

Object sandboxTraceSettingsObj) at Microsoft.Crm.Sandbox.SandboxOrganizationServiceWrapper.ExecuteInternal(OrganizationRequest request) at Microsoft.Crm.Sandbox.SandboxOrganizationServiceWrapper.CreateInternal(Entity entity) at Cobalt.Adapters.Platform.Crm2011.DataRequestHandler.Create(DynamicEntity entity) at Cobalt.Components.Snapshot.BusinessObjects.SnapshotBusinessObject.Clone() at Cobalt.Components.Snapshot.Plugins.SnapshotEventHandler.PostUpdate() at Cobalt.Components.Snapshot.Plugins.EventHandler.Execute(String messageName, RequestStage stage, Guid businessUnitId, Guid userId, List`1 parentEntityCollection)

--- End of inner exception stack trace --- at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor) at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments) at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) at System.Reflection.MethodBase.Invoke(Object obj, Object[] parameters) at Cobalt.Components.Snapshot.Plugins.EventDispatcher.DispatchEvent(Object sender, EventSource source, String eventName, RequestStage stage, Boolean async, DynamicEntity preImageEntity, DynamicEntity postImageEntity, Object[] parameters) at Cobalt.Adapters.Platform.Crm2011.PluginAdapter.Execute(IServiceProvider serviceProvider)

I have the same question (0)
  • Community Member Profile Picture
    on at
    RE: Error assigning user on specific account record

    Can you check if there is any alternate keys on the account entity? The error message is about duplicate keys and the Account GUID is not within our control, either there is some other alternate key causing this problem ( I don't see how though).

    As an alternative solution to make sure the account itself is not the reason, install the chrome extension Level Up and clone the account record. Try to assign the owner on the clone and see what happens.

  • Redweb Profile Picture
    40 on at
    RE: Error assigning user on specific account record

    Thank you for the prompt reply.  There are no keys associated to the account entity.

    I cloned the record using Level Up and whilst the record cloned I was unable to save with this as the error message

      at Microsoft.Crm.Extensibility.OrganizationSdkServiceInternal.CreateInternal(Entity entity, InvocationContext invocationContext, CallerOriginToken callerOriginToken, WebServiceType serviceType, Boolean checkAdminMode, Dictionary`2 optionalParameters)

      at Microsoft.Crm.Extensibility.OData.CrmODataExecutionContext.CreateOrganizationResponse(Entity entity)

      at Microsoft.Crm.Extensibility.OData.CrmODataServiceDataProvider.CreateEdmEntity(CrmODataExecutionContext context, String edmEntityName, EdmEntityObject entityObject, Boolean isUpsert)

      at Microsoft.Crm.Extensibility.OData.EntityController.PostEntitySetImplementation(String& entitySetName, EdmEntityObject entityObject)

      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 lambda_method(Closure , Object , Object[] )

      at System.Web.Http.Controllers.ReflectedHttpActionDescriptor.ActionExecutor.<>c__DisplayClass10.<GetExecutor>b__9(Object instance, Object[] methodParameters)

      at System.Web.Http.Controllers.ReflectedHttpActionDescriptor.ExecuteAsync(HttpControllerContext controllerContext, IDictionary`2 arguments, CancellationToken cancellationToken)

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

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

      at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)

      at System.Web.Http.Controllers.ApiControllerActionInvoker.<InvokeActionAsyncCore>d__0.MoveNext()

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

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

      at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)

      at System.Web.Http.Controllers.ActionFilterResult.<ExecuteAsync>d__2.MoveNext()

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

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

      at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)

      at System.Web.Http.Dispatcher.HttpControllerDispatcher.<SendAsync>d__1.MoveNext()

    Activity Id: 13dd0c96-90b9-4d19-9f81-964aa508a3f8

  • Suggested answer
    Community Member Profile Picture
    on at
    RE: Error assigning user on specific account record

    OK, what we are mostly sure of is that this is a bad data problem and we both agree that this is a bad error to show with no or little information. There is a piece of information in that specific account that is causing this. Before we go into trying to find out which piece of data is that, can you confirm that no plugins are running? May be this account is triggering some edge case in some custom code?

    If there are no plugins or any kind of code running and if you are really willing to know the piece of bad data then you need to spend some time, try to clone the record with Level up, start by your custom fields then OOB fields, one by one, clear them out and try to save, once you are able to save the record then that's the piece of info that is causing this. Please keep me updated on this :)

  • Verified answer
    Paul_Owen Profile Picture
    2,027 on at
    RE: Error assigning user on specific account record

    Is the User you're trying to assign the record to in a different Business Unit? Also that error is related to the Cobalt Snapshot Plugin that I'm guessing you have installed to clone records so that's where I'd start looking for the peoblem.

  • Redweb Profile Picture
    40 on at
    RE: Error assigning user on specific account record

    Many thanks for everyone's help.  Yes we installed Colbalt to clone contacts that moved organisations.  

    So I looked closely at the contacts associated to the account.  I set all those contacts' ownership to the user I wanted to assign the account to.   I was then able to reassign the account as needed.   Not sure why this would make a difference but it did.

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
MVP-Daniyal Khaleel Profile Picture

MVP-Daniyal Khaleel 125

#2
Tom_Gioielli Profile Picture

Tom_Gioielli 98 Super User 2025 Season 2

#3
Erin Lubben Profile Picture

Erin Lubben 73

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans