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

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

Unable to delete managed solution

(0) ShareShare
ReportReport
Posted on by 107

I got this error

Unhandled exception:
Exception type: System.ServiceModel.FaultException`1[Microsoft.Xrm.Sdk.OrganizationServiceFault]
Message: Cannot delete attribute: new_vendorid from Entity: new_vendor since the attribute is not a custom fieldDetail:
<OrganizationServiceFault xmlns:i="www.w3.org/.../XMLSchema-instance" xmlns="schemas.microsoft.com/.../Contracts">
<ActivityId>af8bebf2-eedd-424a-9b24-57ae21a51048</ActivityId>
<ErrorCode>-2147192823</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.SolutionService</d2p1:value>
</KeyValuePairOfstringanyType>
<KeyValuePairOfstringanyType>
<d2p1:key>ApiOriginalExceptionKey</d2p1:key>
<d2p1:value xmlns:d4p1="www.w3.org/.../XMLSchema" i:type="d4p1:string">Microsoft.Crm.CrmException: Cannot delete attribute: new_vendorid from Entity: new_vendor since the attribute is not a custom field ---&gt; Microsoft.Crm.CrmException: Cannot delete attribute: new_vendorid from Entity: new_vendor since the attribute is not a custom field
at Microsoft.Crm.Metadata.AttributeService.ValidateForDelete(Guid attributeId, ExecutionContext context)
at Microsoft.Crm.Metadata.AttributeService.DeleteHelper(Guid attributeId, MetadataHelper metadataHelper, ExecutionContext context)
at Microsoft.Crm.Metadata.AttributeService.&lt;&gt;c__DisplayClass26_0.&lt;Delete&gt;b__0()
at Microsoft.PowerApps.CoreFramework.ActivityLoggerExtensions.Execute(ILogger logger, EventId eventId, ActivityType activityType, Action action, IEnumerable`1 additionalCustomProperties)
at Microsoft.Xrm.Telemetry.XrmTelemetryExtensions.Execute(ILogger logger, XrmTelemetryActivityType activityType, Action action)
at Microsoft.Crm.Metadata.AttributeUninstallHandler.DeleteComponent(ComponentTypeMapData componentTypeData, Guid componentObjectId, SolutionUninstallContext solutionUninstallContext)
at Microsoft.Crm.ObjectModel.SolutionComponentUninstaller.Uninstall(ComponentTypeMapData componentTypeData, Guid componentObjectId, SolutionUninstallContext solutionUninstallContext)
at Microsoft.Crm.ObjectModel.UninstallHandler.&lt;&gt;c__DisplayClass6_0.&lt;CascadeUninstallToComponent&gt;b__0()
at Microsoft.PowerApps.CoreFramework.ActivityLoggerExtensions.Execute(ILogger logger, EventId eventId, ActivityType activityType, Action action, IEnumerable`1 additionalCustomProperties)
at Microsoft.Xrm.Telemetry.XrmTelemetryExtensions.Execute(ILogger logger, XrmTelemetryActivityType activityType, Action action)
at Microsoft.Crm.ObjectModel.UninstallHandler.CascadeUninstallToComponent(ComponentTypeMapData typeData, String[] conditionColumns, Object[] conditionValues, SolutionUninstallContext solutionUninstallContext)
at Microsoft.Crm.Metadata.RelationshipUninstallHandler.CascadeUninstallToLookupAttributes(Guid relationshipId, Boolean referencing, SolutionUninstallContext solutionUninstallContext)
at Microsoft.Crm.Metadata.RelationshipUninstallHandler.CascadeUninstall(ComponentTypeMapData componentTypeData, Guid componentObjectId, SolutionUninstallContext solutionUninstallContext)
at Microsoft.Crm.ObjectModel.SolutionComponentUninstaller.Uninstall(ComponentTypeMapData componentTypeData, Guid componentObjectId, SolutionUninstallContext solutionUninstallContext)
at Microsoft.Crm.Metadata.EntityRelationshipRelationshipsUninstallHandler.CascadeUninstall(ComponentTypeMapData componentTypeData, Guid componentObjectId, SolutionUninstallContext solutionUninstallContext)
at Microsoft.Crm.ObjectModel.SolutionComponentUninstaller.Uninstall(ComponentTypeMapData componentTypeData, Guid componentObjectId, SolutionUninstallContext solutionUninstallContext)
at Microsoft.Crm.ObjectModel.UninstallHandler.&lt;&gt;c__DisplayClass6_0.&lt;CascadeUninstallToComponent&gt;b__0()
at Microsoft.PowerApps.CoreFramework.ActivityLoggerExtensions.Execute(ILogger logger, EventId eventId, ActivityType activityType, Action action, IEnumerable`1 additionalCustomProperties)
at Microsoft.Xrm.Telemetry.XrmTelemetryExtensions.Execute(ILogger logger, XrmTelemetryActivityType activityType, Action action)
at Microsoft.Crm.ObjectModel.UninstallHandler.CascadeUninstallToComponent(ComponentTypeMapData typeData, String[] conditionColumns, Object[] conditionValues, SolutionUninstallContext solutionUninstallContext)
at Microsoft.Crm.Metadata.EntityRelationshipUninstallHandler.CascadeUninstallToEntityRelationshipRelationships(Guid entityRelationshipId, SolutionUninstallContext solutionUninstallContext)
at Microsoft.Crm.Metadata.EntityRelationshipUninstallHandler.CascadeUninstall(ComponentTypeMapData componentTypeData, Guid componentObjectId, SolutionUninstallContext solutionUninstallContext)
at Microsoft.Crm.ObjectModel.SolutionComponentUninstaller.Uninstall(ComponentTypeMapData componentTypeData, Guid componentObjectId, SolutionUninstallContext solutionUninstallContext)
at Microsoft.Crm.Metadata.EntityUninstallHandler.CascadeUninstallToEntityRelationships(Guid entityId, SolutionUninstallContext solutionUninstallContext)
at Microsoft.Crm.Metadata.EntityUninstallHandler.CascadeUninstall(ComponentTypeMapData componentTypeData, Guid componentObjectId, SolutionUninstallContext solutionUninstallContext)
at Microsoft.Crm.ObjectModel.SolutionComponentUninstaller.Uninstall(ComponentTypeMapData componentTypeData, Guid componentObjectId, SolutionUninstallContext solutionUninstallContext)
at Microsoft.Crm.ObjectModel.TypeUninstallHandler.&lt;&gt;c__DisplayClass7_0.&lt;UninstallComponent&gt;b__0()
at Microsoft.PowerApps.CoreFramework.ActivityLoggerExtensions.Execute(ILogger logger, EventId eventId, ActivityType activityType, Action action, IEnumerable`1 additionalCustomProperties)
at Microsoft.Xrm.Telemetry.XrmTelemetryExtensions.Execute(ILogger logger, XrmTelemetryActivityType activityType, Action action)
at Microsoft.Crm.ObjectModel.TypeUninstallHandler.Uninstall(SolutionUninstallContext solutionUninstallContext)
at Microsoft.Crm.ObjectModel.SolutionUninstallService.Uninstall(ISolution solution, DynamicMetadataCache cache, ExecutionContext context)
at Microsoft.Crm.ObjectModel.SolutionServiceInternal`1.DeleteInternal(ISolution solution, ExecutionContext context)
at Microsoft.Crm.ObjectModel.SolutionServiceInternal`1.&lt;&gt;c__DisplayClass10_2.&lt;DeleteAndUpdate&gt;b__0()
at Microsoft.Crm.ObjectModel.CustomizationSqlLockManager.ExecuteInLock(String operationName, Int32 errorCode, Action action)
at Microsoft.Crm.ObjectModel.SolutionServiceInternal`1.DeleteAndUpdate(BusinessEntityMoniker moniker, ExecutionContext context, IBusinessEntity upgradingSolution)
at Microsoft.PowerApps.CoreFramework.ActivityLoggerExtensions.Execute(ILogger logger, EventId eventId, ActivityType activityType, Action action, IEnumerable`1 additionalCustomProperties)
at Microsoft.Xrm.Telemetry.XrmTelemetryExtensions.Execute(ILogger logger, XrmTelemetryActivityType activityType, Action action)
--- 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.&lt;&gt;c__DisplayClass2_1.&lt;Execute&gt;b__0()</d2p1:value>
</KeyValuePairOfstringanyType>
<KeyValuePairOfstringanyType>
<d2p1:key>ApiStepKey</d2p1:key>
<d2p1:value xmlns:d4p1="www.w3.org/.../XMLSchema" i:type="d4p1:string">2a71496d-3f12-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">af8bebf2-eedd-424a-9b24-57ae21a51048</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>
<KeyValuePairOfstringanyType>
<d2p1:key>HasRetried</d2p1:key>
<d2p1:value xmlns:d4p1="www.w3.org/.../XMLSchema" i:type="d4p1:string">True</d2p1:value>
</KeyValuePairOfstringanyType>
<KeyValuePairOfstringanyType>
<d2p1:key>RetryExecutionStatus</d2p1:key>
<d2p1:value xmlns:d4p1="www.w3.org/.../XMLSchema" i:type="d4p1:string">Microsoft.Crm.Core.Extensions.Retry.RetryExecutionStatus</d2p1:value>
</KeyValuePairOfstringanyType>
</ErrorDetails>
<Message>Cannot delete attribute: new_vendorid from Entity: new_vendor since the attribute is not a custom field</Message>
<Timestamp>2019-03-27T14:19:19.1904444Z</Timestamp>
<ExceptionRetriable>false</ExceptionRetriable>
<ExceptionSource i:nil="true" />
<InnerFault i:nil="true" />
<OriginalException i:nil="true" />
<TraceText i:nil="true" />
</OrganizationServiceFault>

*This post is locked for comments

I have the same question (0)
  • Martin Donnelly Profile Picture
    1,030 on at

    What can you tell us about attribute: new_vendorid from Entity: new_vendor?  Part of the managed solution?  Customization after the managed solution?  In an earlier version of the managed solution but not the current one?

  • Suggested answer
    Sreevalli Profile Picture
    3,256 on at

    Hi,

    open the entity "new_vendor", click on show dependencies then check and clear all. then only you can delete the solution

  • Suggested answer
    gdas Profile Picture
    50,091 Moderator on at

    Hi ,

    If you have unmanaged version of the solution in the source instance  you can try to follow below reference steps to remove the entity first from the managed solution.

    www.inogic.com/.../how-to-delete-component-from-managed-solution-in-dynamics-crm-2016

    After apply solution upgrade  once  entity will delete from the managed solution   then try to delete the  managed solution itself.

  • Jide Bantale Profile Picture
    107 on at

    Hi Martin,

    new_vendorid attribute is the primary key for new_vendor entity. It is part of the managed solution.

    Also, customization has been done after the managed solution.

    I imported the newer version from sandbox(1.0.1.0) to production(1.0.0.0) which contains fewer components (vendor was excluded from the new version) but that did not resolve the issue, instead I got duplicates of fields on different entities.

    ================================================================

    Initial Problem

    ===============================================================

    The solution was imported from the sandbox environment to the production, but further customization continued on the production env. and this caused problem as the sandbox was not upto date with these customizations. In the event to revert the issue and enforce that all customizations come from sandbox, I want to delete solution on the production env and import again from sandbox.  I have removed all depencies before deleting the solution but then I got this error on production.

  • Jide Bantale Profile Picture
    107 on at

    Hi Sreevalli,

    I can't clear the dependencies. I already removed all dependencies the managed solution had before trying to delete it.

  • Jide Bantale Profile Picture
    107 on at

    I have tried it but still did not work.

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…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
SA-08121319-0 Profile Picture

SA-08121319-0 4

#1
Calum MacFarlane Profile Picture

Calum MacFarlane 4

#3
Alex Fun Wei Jie Profile Picture

Alex Fun Wei Jie 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans