Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics CRM forum
Answered

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?

  • 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."

Helpful resources

Quick Links

Replay now available! Dynamics 365 Community Call (CRM Edition)

Catch up on the first D365 Community Call held on 7/10

Community Spotlight of the Month

Kudos to Saurav Dhyani!

Congratulations to the June Top 10 community leaders!

These stars go above and beyond . . .

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 287,696 Super User

#2
Martin Dráb Profile Picture

Martin Dráb 225,490 Super User

#3
nmaenpaa Profile Picture

nmaenpaa 101,148

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans