I'm trying to merge an account record with another. After the merge-dialog an clicking on okay, I get the message that a record with same values already exists. I deactivated all duplicate detection rules but same issue. Also I checked if an alternate key exists on account. nope....
I checked the trace an got the following stacktrace: - what does the businessprocessflowinstance has to do with this?
Web Service Plug-in failed in SdkMessageProcessingStepId: {}; EntityName: businessprocessflowinstance; Stage: 30; MessageName: Update; AssemblyName: Microsoft.Crm.Extensibility.InternalOperationPlugin, Microsoft.Crm.ObjectModel, Version=9.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35; ClassName: Microsoft.Crm.Extensibility.InternalOperationPlugin; Exception: Unhandled Exception: System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation.
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.Web.Services.Protocols.LogicalMethodInfo.Invoke(Object target, Object[] values)
at Microsoft.Crm.Extensibility.InternalOperationPlugin.Execute(IServiceProvider serviceProvider)
at Microsoft.Crm.Extensibility.V5PluginProxyStep.ExecuteInternal(PipelineExecutionContext context)
at Microsoft.Crm.Extensibility.VersionedPluginProxyStepBase.Execute(PipelineExecutionContext context)
Inner Exception: Microsoft.Crm.BusinessEntities.CrmDuplicateRecordException: Cannot insert duplicate key.
at Microsoft.Crm.Platform.Server.DataEngine.EntityCrudManager.ThrowDuplicateRecordException(IBusinessEntity entity, ExecutionContext context, SqlException e)
at Microsoft.Crm.Platform.Server.DataEngine.EntityCrudManager.<>c__DisplayClass5_0.<Update>b__0()
at Microsoft.PowerApps.CoreFramework.ActivityLoggerExtensions.Execute(ILogger logger, EventId eventId, ActivityType activityType, Action action)
at Microsoft.Xrm.Telemetry.XrmTelemetryExtensions.Execute(ILogger logger, XrmTelemetryActivityType activityType, Action action)
at Microsoft.Crm.BusinessEntities.BusinessProcessObject.DoUpdate(IBusinessEntity entity, FilterExpression filter, ExecutionContext context)
[2022-10-06 10:23:32.607] Process: w3wp |Organization:00000000-0000-0000-0000-000000000000 |Thread: 65 |Category: Exception |User: 00000000-0000-0000-0000-000000000000 |Level: Error |ReqId: |ActivityId: | CrmDuplicateRecordException..ctor ilOffset = 0x9
at CrmDuplicateRecordException..ctor(String message, Exception innerException, Int32 errorCode) ilOffset = 0x9
at RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor) ilOffset = 0xFFFFFFFF
at RuntimeConstructorInfo.Invoke(BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) ilOffset = 0xF4
at RuntimeType.CreateInstanceImpl(BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes, StackCrawlMark& stackMark) ilOffset = 0x1C8
at Activator.CreateInstance(Type type, BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes) ilOffset = 0xAF
at Activator.CreateInstance(Type type, Object[] args) ilOffset = 0x0
at VersionedPluginProxyStepBase.WrapExceptionToThrow(CrmException exception, PipelineExecutionContext context) ilOffset = 0x56
at VersionedPluginProxyStepBase.Execute(PipelineExecutionContext context) ilOffset = 0x7
at PipelineInstrumentationHelper.Execute(Boolean instrumentationEnabled, String stopwatchName, ExecuteWithInstrumentation action, PipelineExecutionContext context) ilOffset = 0x83
at <>c__DisplayClass2_1.<Execute>b__0() ilOffset = 0x84
at ActivityLoggerExtensions.Execute(ILogger logger, EventId eventId, ActivityType activityType, Action action) ilOffset = 0x49
at XrmTelemetryExtensions.Execute(ILogger logger, XrmTelemetryActivityType activityType, Action action) ilOffset = 0x12
at Pipeline.Execute(PipelineExecutionContext context) ilOffset = 0x127
at PipelineInstrumentationHelper.Execute(Boolean instrumentationEnabled, String stopwatchName, ExecuteWithInstrumentation action, PipelineExecutionContext context) ilOffset = 0x32
at MessageProcessor.Execute(PipelineExecutionContext context) ilOffset = 0x237
at InternalMessageDispatcher.Execute(PipelineExecutionContext context) ilOffset = 0x104
at ExtensiblePlatformMessageDispatcher.Execute(PipelineExecutionContext pluginContext) ilOffset = 0x0
at ExtensiblePlatformMessageDispatcher.UpdateWithInvocationSource(BusinessEntity entity, FilterExpression filter, Int32 invocationSource, ExecutionContext context) ilOffset = 0x101
at ExtensiblePlatformMessageDispatcher.Update(BusinessEntity entity, FilterExpression filter, ExecutionContext context) ilOffset = 0xA
at <>c__DisplayClass187_0.<UpdateWithPipelineAndExtensions>b__0() ilOffset = 0xC1
at ActivityLoggerExtensions.Execute(ILogger logger, EventId eventId, ActivityType activityType, Action action) ilOffset = 0x49
at XrmTelemetryExtensions.Execute(ILogger logger, XrmTelemetryActivityType activityType, Action action) ilOffset = 0x12
at <>c__DisplayClass178_0.<Update>b__0() ilOffset = 0x98
at ActivityLoggerExtensions.Execute(ILogger logger, EventId eventId, ActivityType activityType, Action action) ilOffset = 0x49
at XrmTelemetryExtensions.Execute(ILogger logger, XrmTelemetryActivityType activityType, Action action) ilOffset = 0x12
at BpfBusinessEntityService.Update(IBusinessEntity entity, ExecutionContext context) ilOffset = 0x5B
at <>c__DisplayClass23_0.<CascadeMergeThroughOneToManyEntityRelationships>b__0() ilOffset = 0x2E3
at ActivityLoggerExtensions.Execute(ILogger logger, EventId eventId, ActivityType activityType, Action action) ilOffset = 0x49
at XrmTelemetryExtensions.Execute(ILogger logger, XrmTelemetryActivityType activityType, Action action) ilOffset = 0x12
at <>c__DisplayClass22_0.<CascadeMerge>b__0() ilOffset = 0x65
at ActivityLoggerExtensions.Execute(ILogger logger, EventId eventId, ActivityType activityType, Action action) ilOffset = 0x49
at XrmTelemetryExtensions.Execute(ILogger logger, XrmTelemetryActivityType activityType, Action action) ilOffset = 0x12
at BusinessProcessObject.Merge(BusinessEntityMoniker masterMoniker, Guid subordinateId, IBusinessEntity entity, Boolean bPerformParentingChecks, ExecutionContext context) ilOffset = 0x14D
at AccountService.Merge(BusinessEntityMoniker masterMoniker, Guid subordinateId, IBusinessEntity entity, Boolean performParentingChecks, ExecutionContext context) ilOffset = 0x25
at RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor) ilOffset = 0xFFFFFFFF
at RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments) ilOffset = 0x16
at RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) ilOffset = 0x6C
at LogicalMethodInfo.Invoke(Object target, Object[] values) ilOffset = 0x3F
at InternalOperationPlugin.Execute(IServiceProvider serviceProvider) ilOffset = 0x43
at V5PluginProxyStep.ExecuteInternal(PipelineExecutionContext context) ilOffset = 0x0
at VersionedPluginProxyStepBase.Execute(PipelineExecutionContext context) ilOffset = 0x7
at PipelineInstrumentationHelper.Execute(Boolean instrumentationEnabled, String stopwatchName, ExecuteWithInstrumentation action, PipelineExecutionContext context) ilOffset = 0x83
at <>c__DisplayClass2_1.<Execute>b__0() ilOffset = 0x84
at ActivityLoggerExtensions.Execute(ILogger logger, EventId eventId, ActivityType activityType, Action action) ilOffset = 0x49
at XrmTelemetryExtensions.Execute(ILogger logger, XrmTelemetryActivityType activityType, Action action) ilOffset = 0x12
at Pipeline.Execute(PipelineExecutionContext context) ilOffset = 0x127
at PipelineInstrumentationHelper.Execute(Boolean instrumentationEnabled, String stopwatchName, ExecuteWithInstrumentation action, PipelineExecutionContext context) ilOffset = 0x32
at MessageProcessor.Execute(PipelineExecutionContext context) ilOffset = 0x237
at InternalMessageDispatcher.Execute(PipelineExecutionContext context) ilOffset = 0x104
at ExternalMessageDispatcher.ExecuteInternal(IInProcessOrganizationServiceFactory serviceFactory, IPlatformMessageDispatcherFactory dispatcherFactory, Guid callerRegardingObjectId, Int32 invocationSource, Version endpointVersion, OrganizationRequest request, OrganizationInternalRequest organizationInternalRequest) ilOffset = 0x33D
at OrganizationSdkServiceInternal.DispatchRequest(OrganizationRequest request, OrganizationInternalRequest organizationInternalRequest, SdkResponseDescription responseDescription, SdkPerformanceCounterContext sdkPerformanceCounterContext) ilOffset = 0x6
at OrganizationSdkServiceInternal.ExecuteRequestRequestWithInstrumentation(OrganizationRequest request, OrganizationInternalRequest organizationInternalRequest) ilOffset = 0xCD
at <>c__DisplayClass17_0.<ExecuteRequest>b__0() ilOffset = 0xAA
at ActivityLoggerExtensions.Execute(ILogger logger, EventId eventId, ActivityType activityType, Func`1 func) ilOffset = 0x43
at XrmTelemetryExtensions.Execute(ILogger logger, XrmTelemetryActivityType activityType, Func`1 func) ilOffset = 0x0
at OrganizationSdkServiceInternal.ExecuteRequest(OrganizationRequest request, CorrelationToken correlationToken, CallerOriginToken callerOriginToken, WebServiceType serviceType, UserAuth userAuth, Guid targetUserId, Guid targetCallerRegardingObjectId, UserType targetUserType, OrganizationContext context, Boolean returnResponse, Boolean checkAdminMode) ilOffset = 0x11E
at OrganizationSdkServiceInternal.ExecuteRequestInternal(OrganizationRequest request, CorrelationToken correlationToken, CallerOriginToken callerOriginToken, WebServiceType serviceType, Boolean checkAdminMode, ExecutionContext executionContext) ilOffset = 0x7F
at OrganizationSdkServiceInternal.ExecuteRequest(OrganizationRequest request, CorrelationToken correlationToken, CallerOriginToken callerOriginToken, WebServiceType serviceType, Boolean checkAdminMode, ExecutionContext executionContext) ilOffset = 0x60
at OrganizationSdkServiceInternal.Execute(OrganizationRequest request, CorrelationToken correlationToken, CallerOriginToken callerOriginToken, WebServiceType serviceType, Boolean checkAdminMode, ExecutionContext executionContext) ilOffset = 0x1B
at InprocessServiceProxy.ExecuteCore(OrganizationRequest request) ilOffset = 0x20
at PlatformCommand.XrmExecuteInternal() ilOffset = 0xB5
at MergeRecordsHandler.Merge(String dataXml, Guid masterId, Guid subordinateId, Boolean update, Int32 parentingCheck, Int32 objectTypeCode) ilOffset = 0x98
at MergeRecordsHandler.ProcessRequestInternal(HttpRequest request) ilOffset = 0xE0
at AppHttpHandlerWithKeepAlive.ProcessRequestInternal(HttpContext context) ilOffset = 0x3D
at CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() ilOffset = 0x18D
at HttpApplication.ExecuteStepImpl(IExecutionStep step) ilOffset = 0x64
at HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) ilOffset = 0x15
at PipelineStepManager.ResumeSteps(Exception error) ilOffset = 0x27A
at HttpApplication.BeginProcessRequestNotification(HttpContext context, AsyncCallback cb) ilOffset = 0x31
at HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context) ilOffset = 0xB0
at PipelineRuntime.ProcessRequestNotificationHelper(IntPtr rootedObjectsPointer, IntPtr nativeRequestContext, IntPtr moduleData, Int32 flags) ilOffset = 0x131
at PipelineRuntime.ProcessRequestNotification(IntPtr rootedObjectsPointer, IntPtr nativeRequestContext, IntPtr moduleData, Int32 flags) ilOffset = 0x0
at UnsafeIISMethods.MgdIndicateCompletion(IntPtr pHandler, RequestNotificationStatus& notificationStatus) ilOffset = 0xFFFFFFFF
at UnsafeIISMethods.MgdIndicateCompletion(IntPtr pHandler, RequestNotificationStatus& notificationStatus) ilOffset = 0xFFFFFFFF
at PipelineRuntime.ProcessRequestNotificationHelper(IntPtr rootedObjectsPointer, IntPtr nativeRequestContext, IntPtr moduleData, Int32 flags) ilOffset = 0x1E7
at PipelineRuntime.ProcessRequestNotification(IntPtr rootedObjectsPointer, IntPtr nativeRequestContext, IntPtr moduleData, Int32 flags) ilOffset = 0x0
thank you for any hint
©a-x-i