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)

How to delete managed fields where iscomponentdeletionenabled is false?

(2) ShareShare
ReportReport
Posted on by 74 User Group Leader

We have some custom fields that are now obsolete and I need to emove. We created these fields but they got included in a managed solution that ended up overwriting our development environment.
There are no dependencies. When I try to delete the fields in the UI, I get an error RE:
The 'Delete' operation on the current component(name='Attribute', id='27b59de5-6d13-43ac-a668-a3b79abefb4b') failed during managed property evaluation of condition: 'Managed Property Name: iscomponentdeletionenabled; Component Name: Attribute; '

I tried the method of creating the Managed Solution and updating the Managed Solution to delete the field components, but they were not removed. Method here.

I cannot find this attribute in the MetadataSchema in the database (to switch false/true?).

Is there a way to find and edit the offending condition in the database or the customizations.xml file to enable deletion of these obsolete fields?

*This post is locked for comments

I have the same question (0)
  • Charles Abi Khirs Profile Picture
    3,569 on at

    Hello,

    What I suggest is the following:

    1. Create a new "temp" solution

    2. Add all the components included in the main solution into this temp solution

    3. Delete the obsolete fields from your dev environment

    4. Export the temp solution as managed

    5. Export the main solution as managed

    6. Import the temp solution into your destination organization

    7. Delete the main managed solution from your destination organization (this will not remove your components or data, because all your needed composants are already included in the temp solution)

    8. Re-Import the newly exported main solution into your destination organization

    9. Delete the temp solution from your destination organization

  • Allie_B Profile Picture
    74 User Group Leader on at

    Thanks for the reply, Charles. Unfortunately I cannot delete these fields from the dev environment. These custom fields are Managed.

  • Charles Abi Khirs Profile Picture
    3,569 on at

    Where did you get this managed solution? Apply the same in the environment of the solution containing those fields

  • Allie_B Profile Picture
    74 User Group Leader on at

    The previous CRM administrator originally created custom solutions in our Development environment, then exported them to our Production environment as Managed solutions.

    At one point a database backup of the Development database with Unmanaged solutions was not saved as requested.

    The Development environment was refreshed from a copy of the Production database (containing Managed solutions), overwriting the Unmanaged customizations.

    Our Previously Unmanaged solutions became Managed.

  • Suggested answer
    Charles Abi Khirs Profile Picture
    3,569 on at

    You can try the below:

    1. Take a backup of your DEV environment

    2. Extract your managed solutions

    3. Open the solution.xml solution file in an xml editor

    4. Change the Managed element from 1 to 0

    5. Recompress your files into a .zip file

    6. Import the solution

  • Suggested answer
    Harsha Asadi Profile Picture
    10 on at

    Hi,

    You were able to solve this issue. If yes do let me know the steps.

    As I have exact similar situation.

    Thanks in advance.

  • v22arvind Profile Picture
    65 on at

    Well, while you'll get the holding/stage-upgrade solution everywhere which is the supported/only recommended way, there are scenarios where you don't even know what other stuff would get deleted since the solution is too large or you have multiple managed solutions having that attribute and so above recommended approach doesn't works.

    I have a on-prem setup and have access to DB and this is just a test environment where some incorrect attribute got created which I just need to delete.

    While I already know what you are doing but I should add - PLEASE DO AT YOUR OWN RISK AND ITS UNSUPPORTED!

    I think the columns which represent 'iscomponentdeletionenabled' property are either 'IsUnmanagedAttribute' or 'IsManaged' or both.

    So I fired an update command to change those:

    update Attribute

    set IsUnmanagedAttribute = 1, IsManaged = 0

    where Name = 'name of attribute' <put additional conditions and ensure that you get only the rows related to your attributes>

    and then I tried deleting the field from 'default solution' - bam! another error but it was little different:

    The 'Delete' operation on the current component(name='OptionSet', id='some guid') failed during managed property evaluation of condition: 'Managed Property Name: iscomponentdeletionenabled; Component Name: OptionSet

    now its complaining about the optionset - because my fields were of type option set. We'll no worries, another update to the optionset table:

    update OptionSet

    set IsManaged = 0

    where Name = 'find your optonset or use id instead from the error above'.

    Tried deleting from the default solution again - voila, the fields are gone!

    Now I need to run the deployment to see if everything is ok or broken :)

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