Working with option sets

Starting with option sets, things get a little bit more interesting. Now we are talking about a set of values stored in a structure similar to a dictionary's collection of name/value pairs.

Getting ready

We will be using the previously created solution. Open the solution if not already opened. Alternatively, you can create a brand new solution and add the Contact entity to your solution.

How to do it...

In order to work with an option set, let's follow these steps:

  1. Open the Contact entity added to the solution package.
  2. Open the main form.
  3. Add a new field defined as option set. We will define this field as not using an existing option set, and no default value.
  4. Let's add the following values:
    • Example A, Value 100,000,000
    • Example ...

Get Microsoft Dynamics CRM 2011 Scripting Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.