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
n click on "Publish all
Customizations" for my solution. This will publish all the above changes
and make the new field available on the form.
I
hope this blog about CRM 2011 feature of Global Option Sets (Picklists)
was informative. Please feel free to leave comments, if any.