-
Book Overview & Buying
-
Table Of Contents
Microsoft Dynamics CRM 2011 Scripting Cookbook
By :
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.
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.
In order to work with an option set, let's follow these steps:
Open the Contact entity added to the solution package.
Open the main form.
Add a new field defined as option set. We will define this field as not using an existing option set, and no default value.
Let's add the following values:
Example A, Value 100,000,000
Example B, Value 100,000,001
Example C, Value 100,000,002
Add a new JScript resource named JSOptionSet (new_JSOptionSet)
Add the following function that reads the selected value of the option set and displays it in an alert window:
function GetOSValue()
{
var...
Change the font size
Change margin width
Change background colour