Project Description

This project is a plugin for the XrmToolBox.  It's purpose is to automate the task of converting a Local Option Set (an option set that is defined by and specific to a single entity. e.g. a CRM 4.0 Picklist), into a Global Option Set.

The tool basically performs the following steps:

  • Creates a temporary attribute that is a clone of the current Local Option Set attribute (uses the Temporary Attribute Postfix value to ensure that the name is unique)
  • Replaces the current local attribute on all forms and views with the temporary attribute (Does not currently handle Workflows, or field mapping), optionally copying the data from all existing entities to the temporary attribute.
  • Removes the Local Option Set attribute.
  • Checks to see if a Global Option Set exists for the given Global Option Set Name, if it doesn't, a new Global Option Set is created with same (or possibly same with a prefix) values.  A new Global Option Set attribute is then created on the Entity with the same name as the original Local Option Set.
  • Replaces the temporary local attribute on all forms and views with the temporary attribute (Does not currently handle Workflows), optionally copying the data from the temporary attribute to the global one.
  • Removes the temporary attribute

Main Screen

 GUI Explained:

  • Settings
    • Migrate Data
      • There is no way to convert a local option set to a global one.  The best option is to delete the attribute and create a new one.  This of course looses all of the data and all values for the entity will be null.  To keep this from happening, check this box.  All the data will be migrated from the local attribute to a temporary one, then the local will be deleted, and the global created in it's place, and then the values will be transferred back to the new global attribute before the temporary attribute is removed.  If the data is all null to begin with, or you don't care to keep it, uncheck it.
    •  Convert Values to Global
      • By default, 4.0 Attributes started at 1, rather than 100000001.  If, while migrating the data, you also want the values to be pre-appended by a prefix so the format of the values will look like a standard global optionset value, check this box.  This is primarily used by those who are OCD, or, more likely, the global option set already exists, and you need the exiting values to match. 
    • Temporary Attribute Post-fix
      • The temporary attribute name has to be unique.  I hope that no one has a system where it is standard for attributes to end in "_t_" but if you do, you can change the logical name of the temporary attribute by editing this box.
    • Global Option Set Name
      • This will be the name of the global option set that will be created, or the name of the global option set that already exists, and should be used.
  • Steps
    • Create Temporary Attribute 
      • This is the first step by default.  It just creates the temporary attribute for the entity.  If there happens to be an error migrating the data, this step therefor, has already ran and doesn't need to be run again and can be unchecked.
    • Migrate To Temporary Attribute
      • This may or may not migrate data depending on the setting's "Migrate Data" checkbox.  What it will always do is update all views and forms to use the temporary variable, rather the local one.
    • Remove Local Attribute
      • This just deletes the local attribute.  If there happened to be an error creating the Global Attribute, this step can be skipped since it we should have already been ran.
    • The rest of the steps are identical to the first 3, except doing the migration from the temp value, to the new Global one.

Last edited Sep 24, 2015 at 6:58 PM by hulk2484, version 12