CRM 2011 was released with many new features. New features were added in the core application, configuration and extending CRM. One of the most appreciated new feature is Global option sets. The other name given to it is Global picklists.
In Dynamics CRM 4.0 there were local option sets. Let's say the requirement is to have a country option set in 10 different entity forms. In order to have the country list, we need the country option set in all the entities and so we need 10 country option sets. All these 10 country option sets had same items in it. If we change the name of a country or add a new country, then we need to make a change at all 10 places. Dynamics CRM 2011 has improved upon this limitation. We can have one global option set for a country. Then each country list in every entity can derive from this "country Global option set". In case any changes are there, it will be done at one place and all derived lists are updated.
I will show how to create and use a global option set. I will create a global option set for the country. I will add few countries and then create a local option set in the entity "Movie". The local option set on the "Movie" form will be derived from this global option set. For the clarity of this demo, I have marked important sections on the screen shots by a green rectangle.
1) I will go to my unmanaged solution "Movies". I am soon planning to write a blog on Unmanaged Solutions.
Click on the component "Option Sets" from the left navigation. This will open the list of all my option sets in this solution. All the option sets added here will be Global option sets. These global option sets are part of the solution "Movies" which later can be deployed from one environment to another as part of a managed solution. Click on New button.
|
Click New button to Add a new Global Option Set |
2) The new Global option set window opens. "Display name" is the label of this Global option set. "Name" is the unique Schema name and Logical name for this Global option set. Add the countries as options (also called as items in CRM lingo). Each country I add will have a Label and a Value. I suggest to accept the default "Value" assigned by CRM.
|
New Global Option Set Window |
3) I entered few countries to this Global option set. The Global option set window will look like below. Save and close.
|
Create a new Global Option Set for Countries |
4) I will create a local option set for the entity "Movie". Click on New to create a new field for entity "Movie".
This new option set field for Movie is derived from the Country Global option set. This Movie option set will display all the countries defined in the step above.
|
New Country field for "Movie" Entity |
5) Add the required fields. Pay special attention to the "Type". The Type of this field is "Option Set".
I will select "Yes" to the option of use existing option set.
Select the Country value against the option set. This is where our local field will reference to any Global option set we select.
Leave default value as unassigned. Save and close.
Add this new field on the entity form. I then click on "Publish all Customizations" for my solution. This will publish all the above changes and make the new field available on the form.
|
Configure the new field as Country Global Option Set |
6) Go to any existing record for the entity. I have opened the Movie record "GoldenEye" and find the Country option list. I can select any country from the list. Any changes to the Global option set will be automatically reflected here and at all the places which refers to it.
|
Use the new field on the "Movie" Entity Form |
I hope this blog about CRM 2011 feature of Global Option Sets (Picklists) was informative. Please feel free to leave comments, if any.