How to easily create dependent Picklist(Option Set) in CRM 2011 ?

Remi Boigey, Partner Technical Consultant @ Microsoft France, did a new silverlight application in order to create Dependent Picklist by using a user friendly interface.


Solution Features

  • It provides a generic, re-usable JScript library that can be used for any pair of option set fields.
  • It allows for a chain of dependent option set fields. Because each dependent option set field options are filtered based on the value of another field, additional option set fields options can be filtered by the option chosen in the first dependent option set field. This allows for the possibility of a set of hierarchically dependent option set fields.
  • The filtering of dependent options is set in an XML Web resource. This allows for changing the option mappings without changing the code. Editing an XML Web resource is easier for a non-developer to configure options with less opportunity to break the code.
  • The solution supports multiple languages. The filtering is based solely on the data value of the options rather than any text in the options.
  • Filtering works for any number of instances of an attribute control on the form.

Install the solution

Step 1 : Save the CRM solution on your disk - 

    Step 2 : Import the solution – Settings / Solutions / Import


    Click on Browse Button and select the solution

    Click on next buttons and close the form.

    Refresh the web page.

Test the solution

In order to test the solution, you can use the Case entity with the two OptionSet fields: Case Type and Priority. We will filter them as displayed in the following table:

Case Type

















When you finalized the mapping, click on ‘Get script’ button.

In order to use our script, you need to add a XML web ressource to the targeted entity.

Step 1

  • Go to Settings / Customization / Customize the System / Web Ressources
  • Click on New and fill the following attributes
    • Name = Schema Name
    • Display Name
    • Type
      • Select Data XML
      • Click on ‘Text editor’ and paste your clipboard
  • Save the form

Step 2

  • Go to Settings / Customization / Customize the System / Entities / Case / Forms
  • Open the Main Form
  • Click on Form properties
  • Add “gps_SDK.DepdenentOpeitonSet.js” script as available libraries


  • Then, in the ‘Event Handlers’ section, add the SDK.DependentOptionSet.init function on the control Form for the event OnLoad.
  • And follow the printscreens :


  • Click on Add


- Function: SDK.DependentOptionSet.init
- Check ‘Pass execution context as first parameter’


    The parameter is the schema name of the Web ressource we just created.

  • Click on OK


  • Save the Form.
  • Now, we have to add a function ‘SDK.DependentOptionSet.filterDependentField’ on the onchange event of the primary field (here case type)

- Double click on the ‘Case Type"’ Field


- Select the Events Tab


- Click on Add under the Event Handlers section

  1. Function: SDK.DependentOptionSet.filterDependentField
  2. Don’t Check ‘Pass execution context as first parameter’

Parameters are the schema name of the option set fields..

  • Click on OK
  • Save the Form
  • Publish all customizations


  • Navigate to Case Form and use the picklists : Case Type and Priority
Comments (39)
  1. NAG says:

    Hi, I imported this solution. It imported with warning. And alos when i clicked on Dependent Picklist under customization, its giving an expecting as "Debugging resource strings are unavailable etc.,

    And also can't see any entities under Entity on the "Dependent Picklist form".

    Any Idea?

  2. Could you please send me an email with screen shots?

  3. VK says:

    Where is the "Get Script" button you mentioned in the article?

  4. VK says:

    Never mind…I am getting the same error as NAG when I click on Dependent Picklist…will send you the screenshot in separate email.

  5. Brady Owen says:

    This is not working as expected please help!

  6. Brady Owen says:

    Is now, perfect!

  7. Inga Seelemann says:

    I can't get this to work.  I followed these steps exactly and then when I go to create a new case, the ribbon on the case screen disappears and the dependent pick list doesn't fire.  I removed the event handler and the ribbon came back. I tried to create a dependent pick list with a custom entity and the same effect.  Not sure how I can debug this.  Too bad, as the front end tool is very nice and easy to use.

  8. Richard Sharp says:

    HI, tried to insta;; and use this, get an exception when browsing to the Dependant Picklists Option in Settings. Have emailed you a screenshot, please advise, I would be very grateful.

  9. Simon Tauscheck says:

    Wow, great useful solution. Thanks!

    PS: I have an CRM based on a german base language, javascript wasn't loaded correctly first. Can be usefull for all europe users, you may want to change the asci code of the javascript…

    but then all works perfect!

  10. Carlyd says:

    Nevermind I got it! Thank you so much!

  11. How can you do two different dependent pick lists on the same form? What do I put in the Form Properties "On Load"? Thanks so much!

  12. Heather says:

    Hi there,

    I used the Dependent Option Sets Silverlight application – and it works great – thank you!

    I have a question – I created a dependency between two option set fields on a form and they work perfectly. I then tried to do the same for another set of fields on the same form but it wont work – is there a solution to get this working?


  13. Lily says:

    Getting the below error. Please Help!!

    There was an error with this field's customized event.



    Error:Access is denied.

  14. Boris says:


    got the same error as Lily. This happened when transfered to another environment with SSL authorizaton.

  15. Sreeni Pavalla says:

    Nice Article..!

    Can any one provide me the sample XML that as we need to add as a web resource.

    Thank you in Advance


  16. Sreeni Pavalla says:

    Do we need to create two options sets ot it will automatically creates when we upload XML data.

    Please suggest me



  17. Leon Tribe says:

    Another option for CRM 2011, which is codeless, is to use filtered lookups. Here is my blog explaining the process.…/setting-multi-level-categories-against.html

  18. Thanks for your post. Its quite helpful!

    However, i've a requirement where i've 4 optionsets on the form. Now, with the steps mentioned above I can set dependent optionset between first 2 optionsets. Now, I need to populate 3rd optionset based on selection from 2nd optionset and 4th optionset based on selection from 3rd optionset. Can this be achieved?

    Early reponse is much appreciated. Thanks!

  19. Elie says:

    After finalizing all the required steps working on two specific fields (FIeld A) & Field B) i'm not seeing any results. When i select from the drop a specific data from field A, i'm still seeing all the data in field (B) when i'm suppose to see only the mapped data. Any suggestion?


  20. Fadl says:

    Thanks for the great article ,Now when I open the CRM using IP address instead of Server Name I got JavaScript error access denied

  21. Ilja says:

    I was able to Import the solution and use the form to set up a couple of dependent option sets, but now I need to modify the dependencies and when I click on "Dependent PicklIsts" in the Nav pane I no longer get the form but the code that was generated instead. Is this correct?  How do I go about redoing some of the dependencies?  Thanks.

  22. neel says:

    Thanks for the great article .. explained in very simple steps ….it worked perfectly 🙂

  23. Waqas says:

    H all andI hello neel could explain some steps you followed coz i am not having any error and neither the dependendent values are working Thanks in advance

  24. Pit says:


    What is your solution with the problem, that more then 1 dependant picklists is not working?

    I havt 3 picklists, 1 is depanandt to 2 and 2 dependant to 3, but i will not work.

    THX for any help, Greets Pit

  25. koko says:

    Hello, thank you the great tool ,

    Any idea of how can we add more than two dependent pick list on the same form ? any workaround ? having the same code on change event will break the code and both dependent pick lists will not work .

    Appreciate  your help

  26. Fahmeeda Yaseen says:

    i performed the same steps.but this solution not filtering performed. please help me.

  27. Hi, I find the same problem of Lily but in Chrome only.

    There was an error with this field's customized event.



    To solve this, I modified an javascript, you can find my version on this link.…/how-to-solve-problem-of-dependent.html

  28. enable to see items says:

    Hello, after installation of the solution (CRM 2011 online) Within the solution, I choose a entity, then I'm able to choose a primary picklist and a related picklist but no items are visible in order to make the mapping !! Can you help please?

    Thanks, Raynald from France

  29. Graeme Donnell says:


    What rollup/s is this solution supported against does anyone know?


  30. Compatibility to CRM 2013 RTM says:


    I tried installing this solution in CRM 2013 RC1 and RTM, but in both I can´t see the options.

    So I can choose an Enitity and primary/related Picklists, but then the options are missing.

    Can you confirm this in CRM 2013? Maybe it is just a fault for my part.



  31. Compatibility to CRM 2013 RTM --> Solved says:


    I was able to solve this on my own.

    You need to set up your Internet Explorer to Browser Mode IE8 and Document Mode to "IE8 Standards".

    Just hit F12 on your CRM-Site to get access to these options.  

    This is only relevant for the Setup, End Users don´t Need to Change anything.

    Works like a charm.


  32. Brett says:

    This was working perfectly, but then the option vanished from my Sitemap. I tried uninstalling, but having some difficulties with that. Any idea on how to restore to my sitemap to access it again?

  33. Oliver says:

    Patrick you god! I spent a week tackling this and giving up – I was about to hand edit the XML for 500+ items when I came across your post. Thank you so much!!


    >I was able to solve this on my own.

    >You need to set up your Internet Explorer to Browser Mode IE8 and Document Mode to "IE8 Standards".

    >Just hit F12 on your CRM-Site to get access to these options.  

    >This is only relevant for the Setup, End Users don´t Need to Change anything.

    >Works like a charm.


  34. Mathew Joseph says:

    Thanks for this solution. I have a bit more demanding form.

    I have 4 sets of drop down.

    Service:                     Resource:

    Complaint Type1:    Complaint Type1Step2:

    Complaint Type2:    Complaint Type2Step2:

    Complaint Type3:    Complaint Type3Step2:

    Is there any solution for this problem?

    My Service : Resource: dropdowns are working fine with this code. But I have more dropdowns in the form


  35. Sales Support says:

    Is this solution available as unmanaged? Because in CRM 2015 you can't install it and when you update from crm 2011 to crm 2015 with the installed managed solution there is an error because in the script "getserverurl()" is not supported any more. Script has to be updated to "getClientUrl()".

  36. User says:

    The dependent picklists in not coming out below Dynamics Marketplace

Comments are closed.

Skip to main content