, , , , , , , , , ,

Hello Everyone,

In a recent scenario, I was asked to create a dependent Pick-list where the options of Second Pick-list are dependent on the Value of the First one.  By default there is no such option in Dynamics CRM but I came across a solution from MSDN which worked perfectly for me. For an example scenario A managed solution is present in the latest version of SDK at


I’m going to share the steps in detail for the solution here :-

Step 1:-

Create a Webresource of type Jscript and upload the JScript file from

SDK -> SsmpleCode -> JS -> FormScripts -> SDK.DependentOptionSet.js

Step 2 :-

Create Another Webresource of type XML and upload the XML file from

SDK -> SsmpleCode -> JS -> FormScripts -> TicketDependentOptionSetConfig.xml

Step 3:-

Modify the XML based upon your options from Parent optionSet and Dependent optionSet

In my case the XML is like the following:-

<DependentOptionSetConfig entity="account" >
 <ParentField id="new_category"
  <DependentField id="new_subcategory"
                  label="Sub Category" />
  <Option value="1"
   <ShowOption value="1"
               label="90-100 (K)" />
   <ShowOption value="2"
               label="80-90 (K)" />
   <ShowOption value="3"
               label="70-80 (K)" />
  <Option value="2"
   <ShowOption value="4"
               label="60-70 (K)" />
   <ShowOption value="5"
               label="50-60 (K)" />
   <ShowOption value="6"
               label="40-50 (K)" />
  <Option value="3"
   <ShowOption value="7"
               label="30-40 (K)" />
   <ShowOption value="8"
               label="20-30 (K)" />
   <ShowOption value="9"
               label="10-20 (K)" />
   <ShowOption value="10"
               label="00-10 (K)" />

Step 4 :-

Attach the Liabrary and add the function on OnLoad event of the Form:

Function :-  SDK.DependentOptionSet.init

Parameter :- “new_TicketDependentOptionSetConfig.xml” (its basically the xml that we created before)

Step 5 :-

Add the function at onChage Event of the First OptionSet / Picklist

Function :- SDK.DependentOptionSet.filterDependentField

Parameter :- “new_category”,”new_subcategory”


Now You’re done. After Publishing all the changes, when you first open the record you’ll get the dependent picklist / OptionSet as ReadOnly.

After the selection of the Parent Picklist, the Dependent picklist will show the dependent values.


Hope this was helpful !!!