Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Customer experience | Sales, Customer Insights,...
Suggested answer

Deleted Value from Choice still shows in target environment after import

(3) ShareShare
ReportReport
Posted on by 253
We removed a value from a custom Choice in our dev environment, exported as managed, imported as upgrade to our target environment but the deleted value still shows in target environment, 
 
There are no unmanaged solution layers in target environment. 
 
Is this expected? Do I need to manually delete the value in each environment? 
 
Thanks! 
  • Tom_Gioielli Profile Picture
    1,445 on at
    Deleted Value from Choice still shows in target environment after import
     
    Jumped back into this when I saw another response. Just an FYI on the additional suggested answer from below. There is no such thing, nor has there ever been, such a thing as "unpublishing" changes in CRM. I just want to note that for you and for anyone else who may stumble upon this question in the future.
  • Suggested answer
    Daivat Vartak (v-9davar) Profile Picture
    6,642 Super User 2025 Season 1 on at
    Deleted Value from Choice still shows in target environment after import
    Hello nvrhughes,
     

    Yes, this behavior is expected with managed solutions and option sets (Choices) in Dynamics 365.

    Here's why and what you need to do:

    Understanding Managed Solution Upgrades and Option Sets:

    • Managed Solutions are Additive: When you import a managed solution as an upgrade, the system generally adds the changes from the new version on top of the existing managed solution. It aims to be non-destructive to data and existing customizations.

    • Deletion is a Destructive Change: Removing a value from a managed option set is considered a destructive change. Managed solutions, by design, avoid performing destructive changes during an upgrade to prevent potential data loss or unexpected behavior in the target environment. The system assumes that the existing value might still be in use by existing records.


    •  

    Why the Deleted Value Persists:

    When you import the upgraded managed solution:

    1. The system recognizes that you've removed a value from the Choice field in the new version of the solution.

    2. However, it will not automatically delete that value from the option set in the target environment. This is to ensure that any existing records in the target environment that are currently using that deleted value remain valid and don't suddenly have an empty or incorrect value in that field.


    3.  

    What You Need to Do:

    You are correct. To completely remove the deleted value from the Choice field in your target environment, you will need to perform an additional step:


    1. Unpublish Customizations: In your target environment, go to Settings > Customizations > Customize the System. It's generally a good practice to unpublish all customizations before making schema-level changes like deleting option set values.

    2. Manually Delete the Option Set Value:

      • Navigate to the Choice (Option Set) that you modified. You can find it under Components > Option Sets.

      • Open the specific Choice.

      • Locate the value that you deleted in your development environment.

      • Select the value and click the "Delete" button. 

    3. Publish All Customizations: After deleting the value, Publish All Customizations to apply the change to your environment.

     

    Important Considerations:

    • Data Integrity: Before deleting the option set value in your target environment, ensure that no active records are currently using that value. Deleting a value that is still associated with records can lead to data inconsistencies or errors. You might need to run an Advanced Find query on the entity and field in question to identify any records using the value and update them before deletion.

    • Unmanaged Layers: You mentioned there are no unmanaged solution layers, which is good. Unmanaged customizations can sometimes interfere with managed solution upgrades.

    • Future Upgrades: If you delete the value manually in the target environment, and then later import another upgrade of the managed solution from your development environment (where the value is still absent), the deletion in the target environment will persist as it's now an unmanaged change on top of the managed solution.

    •  

    In summary, the expected behavior for deleting option set values in managed solutions during an upgrade is that the value is not automatically removed from the target environment to prevent data loss. You need to manually delete the value in each target environment after the upgrade and ensure no records are actively using it.

     
    If my answer was helpful, please click Like, and if it solved your problem, please mark it as verified to help other community members find more. If you have further questions, please feel free to contact me.
     
    My response was crafted with AI assistance and tailored to provide detailed and actionable guidance for your Microsoft Dynamics 365 query.
     
    Regards,
    Daivat Vartak
  • Suggested answer
    Tom_Gioielli Profile Picture
    1,445 on at
    Deleted Value from Choice still shows in target environment after import
    Yup, this is expected (and one of the tough parts about option sets). 
     
    My guess is that you have some records where the deleted value is still present in your target environment. This prevents the option from disappearing (this is opposed to doing managed customizations, where it would disappear regardless).
     
    You'll want to clear out any records with the value to be removed prior to solution import, or, just remove the option in your target environment as well.
     
    If this answer helped, please consider marking as verified.

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

🌸 Community Spring Festival 2025 Challenge 🌸

WIN Power Platform Community Conference 2025 tickets!

Jonas ”Jones” Melgaard – Community Spotlight

We are honored to recognize Jonas "Jones" Melgaard as our April 2025…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 294,261 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 233,017 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,158 Moderator

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans