In CRM2011, if an
optionset is already tied to another Global OptionSet, then there is no way to change it.
In one of my projects, I faced the same challenge and figured out a way to do it. Please make a note that this is unsupported as it involves DB changes. So it is advisable TO TAKE A DB BACKUP BEFORE APPLYING THE CHANGES.
Before moving further, It is important to understand what happens at the backend for an option set.
optionset is created
- Entry is made in the MetadataSchema.OptionSet table.
- Entry is also made in the MetadataSchema.Attribute table.
When an optionset is tied to another Global OptionSet
- Column OptionSetId of MetadataSchema.Attribute is linked to OptionSetId of MetadataSchema.OptionSet.
So, with the following
UPDATE query we can change the Global OptionSet which is being tied to the
UPDATE MetadataSchema.Attribute SET OptionSetId = <GLOBALOPTIONSETID> WHERE AttributeId = <ATTRIBUTEID>
- <GLOBALOPTIONSETID> is the
Globaloptionset. It can be found from the MetadataSchema.OptionSet table
- <ATTRIBUTEID> is the ID of the OptionSet attribute that is to be modified.