Dynamics 365 online version 9.0.2.449
I have an unmanaged solution that has the Project entity added with all elements.
I need to remove Project and re-add it with selected elements.
I get the below error. This is definitely on remove, not delete.
Unhandled Exception: System.ServiceModel.FaultException`1[[Microsoft.Xrm.Sdk.OrganizationServiceFault, Microsoft.Xrm.Sdk, Version=9.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]]: The object you tried to delete is associated with another object and cannot be deleted.Detail: <OrganizationServiceFault xmlns:i="www.w3.org/.../XMLSchema-instance" xmlns="schemas.microsoft.com/.../Contracts"> <ActivityId>e6fd69bf-37d3-44d3-af1c-f0779661a47a</ActivityId> <ErrorCode>-2147220953</ErrorCode> <ErrorDetails xmlns:d2p1="schemas.datacontract.org/.../System.Collections.Generic"> <KeyValuePairOfstringanyType> <d2p1:key>ApiExceptionSourceKey</d2p1:key> <d2p1:value xmlns:d4p1="www.w3.org/.../XMLSchema" i:type="d4p1:string">Plugin/Microsoft.Crm.ObjectModel.SolutionComponentService</d2p1:value> </KeyValuePairOfstringanyType> <KeyValuePairOfstringanyType> <d2p1:key>ApiOriginalExceptionKey</d2p1:key> <d2p1:value xmlns:d4p1="www.w3.org/.../XMLSchema" i:type="d4p1:string">Microsoft.Crm.CrmException: The object you tried to delete is associated with another object and cannot be deleted. ---> Microsoft.Crm.CrmException: The object you tried to delete is associated with another object and cannot be deleted. at Microsoft.Crm.BusinessEntities.CascadeEngine.<>c__DisplayClass16_0.<CascadeDeleteBulkOM>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.CascadeEngine.<>c__DisplayClass8_0.<CascadeDeleteDB>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.CascadeEngine.<>c__DisplayClass41_0.<Delete>b__0() at Microsoft.PowerApps.CoreFramework.ActivityLoggerExtensions.Execute[TResult](ILogger logger, EventId eventId, ActivityType activityType, Func`1 func) at Microsoft.Xrm.Telemetry.XrmTelemetryExtensions.Execute[TResult](ILogger logger, XrmTelemetryActivityType activityType, Func`1 func) at Microsoft.Crm.BusinessEntities.BusinessProcessObject.<>c__DisplayClass192_0.<Delete>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.ObjectModel.SolutionComponentService.RemoveSolutionComponent(Guid componentId, Int32 componentType, String solutionUniqueName, ExecutionContext context, Boolean validateSolution) at Microsoft.Crm.ObjectModel.SolutionComponentService.RemoveSolutionComponent(Guid componentId, Int32 componentType, String solutionUniqueName, ExecutionContext context) --- End of inner exception stack trace --- at Microsoft.Crm.Extensibility.VersionedPluginProxyStepBase.Execute(PipelineExecutionContext context) at Microsoft.Crm.Extensibility.PipelineInstrumentationHelper.Execute(Boolean instrumentationEnabled, String stopwatchName, ExecuteWithInstrumentation action, PipelineExecutionContext context) at Microsoft.Crm.Extensibility.Pipeline.<>c__DisplayClass2_1.<Execute>b__0()</d2p1:value> </KeyValuePairOfstringanyType> <KeyValuePairOfstringanyType> <d2p1:key>ApiStepKey</d2p1:key> <d2p1:value xmlns:d4p1="www.w3.org/.../XMLSchema" i:type="d4p1:string">0a59e1ba-3f13-11dd-9bde-0019b9312238</d2p1:value> </KeyValuePairOfstringanyType> <KeyValuePairOfstringanyType> <d2p1:key>ApiDepthKey</d2p1:key> <d2p1:value xmlns:d4p1="www.w3.org/.../XMLSchema" i:type="d4p1:string">1</d2p1:value> </KeyValuePairOfstringanyType> <KeyValuePairOfstringanyType> <d2p1:key>ApiActivityIdKey</d2p1:key> <d2p1:value xmlns:d4p1="www.w3.org/.../XMLSchema" i:type="d4p1:string">e6fd69bf-37d3-44d3-af1c-f0779661a47a</d2p1:value> </KeyValuePairOfstringanyType> <KeyValuePairOfstringanyType> <d2p1:key>ApiPluginSolutionNameKey</d2p1:key> <d2p1:value xmlns:d4p1="www.w3.org/.../XMLSchema" i:type="d4p1:string">System</d2p1:value> </KeyValuePairOfstringanyType> <KeyValuePairOfstringanyType> <d2p1:key>ApiStepSolutionNameKey</d2p1:key> <d2p1:value xmlns:d4p1="www.w3.org/.../XMLSchema" i:type="d4p1:string">System</d2p1:value> </KeyValuePairOfstringanyType> </ErrorDetails> <Message>The object you tried to delete is associated with another object and cannot be deleted.</Message> <Timestamp>2018-07-11T14:46:50.4943245Z</Timestamp> <ExceptionRetriable>false</ExceptionRetriable> <ExceptionSource i:nil="true" /> <InnerFault i:nil="true" /> <OriginalException i:nil="true" /> <TraceText i:nil="true" /> </OrganizationServiceFault>