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)

Error - A managed solution cannot overwrite the Attribute component with Id=XYZ... which has an unmanaged base instance.

(0) ShareShare
ReportReport
Posted on by

I am trying to import a managed solution for dynamics crm online to a client's sandbox environment for testing. I have always chosen to "Overwrite Customizations" while importing. My import is failing on the contact entity and I am getting the following error: 

A managed solution cannot overwrite the Attribute component with Id=xxxx-xxx... which has an unmanaged base instance. The most likely scenario for this error is that an unmanaged solution has installed a new unmanaged Attribute component on the target system, and now a managed solution from the same publisher is trying to install that same Attribute component as managed.  This will cause an invalid layering of solutions on the target system and is not allowed.

I've done some searching, and other's seem to have encountered this a while ago. I have not been able to heed any advice I've found online so far. I'm unsure what the problem is and what I need to do to fix it. Has anyone encountered this, and if so, how have you fixed it? Thanks for any help.

*This post is locked for comments

I have the same question (0)
  • prt33k Profile Picture
    6,907 on at

    Hi,

    You need to delete the attribute from the unmanaged solution and then import the managed solution. You can search the attributeId in custmization.xml and get to know the attribute to be deleted.

    https://social.microsoft.com/Forums/en-US/28a65394-2273-4890-a348-5d736965c049/a-managed-solution-cannot-overwrite-the-attribute-component?forum=crm

    Thanks,

    PS

  • fishyjj Profile Picture
    on at

    Thanks for your reply. When I search my customization.xml file for the guid that the error gives me, it is not in the file. Any ideas how I can pin point what the attribute is it's referring to?

  • Verified answer
    Aiden Kaskela Profile Picture
    19,696 on at

    Hi,

    I've seen this before if you have a development and production environment and one of two things happens:

    1) You create field "abc_myfield" on production /unmanaged/ , get the same field on dev (either by creating it independently or moving it in a solution down from production) /unmanaged/, then try to roll out a /managed/ solution containing that field.

    2) You create a field on dev, roll it out as as /unmanaged/ accidentally then try to roll it out as /managed/.

    In either case, you end up with an unmanaged attribute and try to overwrite it with a managed one, resulting in that error. To fix this, assuming you want it as managed, you need to delete the offending unmanaged attribute from production.

    To see which attribute it is, you can go two ways. Remove parts of your solution until it imports, and whatever you removed last was the offender, or query the metadata on production to get all the attributes and look for the one with that metadata id. You'd use arequest of type RetrieveAllEntitiesRequest and set the filters to include attributes - msdn.microsoft.com/.../microsoft.xrm.sdk.messages.retrieveallentitiesrequest.aspx

    Hope this helps! I'd appreciate if you'd mark this as Answering your question.

    Thanks,

     Aiden

    EDIT: The metadata ID will be in the destination organization, that's why you don't see the value in your xml file.

  • fishyjj Profile Picture
    on at

    Thank you, this is helpful. In order to query the metadata of the target environment, do I need to write a plugin? Or is there a simpler way to do this?

  • fishyjj Profile Picture
    on at

    I've been able to pin point a few attributes that are causing this error and I've deleted them in the managed solution in the target environment. On re-import, it successfully processed the ones that were failing. I've run into one, however, that I cannot delete. There's an entity relationship between contact and knowledge base record. When I go to delete it, I get an error that says I cannot delete it because it is not a custom entity relationship. How do I get rid of this relationship so I can successfully import? Thanks again for your help so far.

  • Community Member Profile Picture
    on at

    In my case, the unmanaged attribute is not a custom field and I do not seem to be able to delete it. The field is Community (aka Social Profile, option set socialprofile_community) and is in one of our custom activity entities. Ideas? Thanks!

  • fishyjj Profile Picture
    on at

    I had the same issue. I ended up resorting to directly editing the customizations.xml file, removing the offending attribute(s). That worked.

  • Saddamk206 Profile Picture
    777 on at

    Remove the the EntityMap tag from Customization xml

    <EntityMap>

    <EntitySource>lead</EntitySource>

    <EntityTarget>contact</EntityTarget>

    <AttributeMaps>

    <AttributeMap>

    …

    </AttributeMap>

    </AttributeMaps>

    </EntityMap>

  • Suggested answer
    oliver.rodrigues Profile Picture
    4,052 on at

    Hey guys.. just got this one solved

    I was facing issue with both Contact-Lead and Incident-IncidentResolution in a clean Trial Environment

    I navigated to the destination environment, opened the Relationship, opened the Mappings and DELETED the mapping that was causing the issue

    Re-imported the solution and all went good

  • thecharwest Profile Picture
    221 on at

    I've created a View in my Prod's App Designer which I now can't find a way to delete because they were created through the App Designer rather than through a Solution. Is there any way around this?

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