Skip to main content

Notifications

Microsoft Dynamics CRM (Archived)

Danger removing value from Option Set?

Posted on by

So I have a global option set on an activity form.  The activity has had values added to the option set beyond what that global option set contains.

I have been asked to remove some of these values as they are no longer needed.  My concern is that there are activity records that have these values already selected.  What if we need to report on these values I am removing in the future?  Is it still possible if they are removed from the option set?

*This post is locked for comments

  • JoaoAyres Profile Picture
    JoaoAyres on at
    Danger removing value from Option Set?
    Microsoft could adress this issue (from my persepctive at least, this is a liability and a issue) creating versioning on a table mantaining optionset values... It has catastrophic implications across any enviroment. 
    I think that they could use a [Entity Code / Entity Description/ OptionSetCode / OptionSetName / Enviroment Code/ Enviroment Name /Version] approach or any variation with at least this information therefore adding security to this negative characteristic of optionsets.
    Business rules sometimes change and adding this ability and flexibility to the system would be a good thing to have.
  • Suggested answer
    Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Danger removing value from Option Set?

    Removing an option from an option set does not affect the underlying records immediately, they still store the original integer values. So if you have an option set called "colour" and remove the option "Blue" which has value "4" then the records will still have a value of 4 stored in the database. But there are several issues with this:

    - if you try to do an advanced find, you can't select the old option for "blue" in the query builder, so you can't identify these records any more

    - if you open one of these records, the form rendering engine knows that the old value is invalid, so it does not get displayed, so it might appear to be null. Depending on the configuration of the option set, the record will be reset to the default value (or "Null" of that is the default)

    - if you create a new option set option (say, "purple") which re-uses the old integer value 4, these old records will now show as being "purple" when viewed or queried

  • Verified answer
    JDMCRM Profile Picture
    JDMCRM 1,795 on at
    RE: Danger removing value from Option Set?

    Edit:

    Removing an Option-Set value from the Option-Set, appears to clear the data contained in existing Records. 

    From Technet: 

    "If you delete an option that has already been used in entity records, the data value in those records will be invalid. If you are not sure, use Advanced Find to see if there are any records set to the value you are about to delete. If they are set to the option you plan to delete, you should change the data before you delete the option. After you delete the option you will no longer be able to use Advanced Find to query records that have that option set."

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Community AMA December 12th

Join us as we continue to demystify the Dynamics 365 Contact Center

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,240 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,149 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans