Skip to content

Dependent Picklists in Microsoft Dynamics CRM 4.0

Very useful, and very easy to do.  A simple application is for NAICS or SIC (Standard Industry Codes).  This industry groupings may have up to three or more levels of detail / summarization depending on how many of the digits of the code you use.  When you pick the first, most general category, you can have a second list present itself, with selections limited by the filter of the first selection.  for example, if the code in the first box was:

  • 33 – Manufacturing; then the second box would be prsented for selection only with choices beginning with 33, e.g.,
    • Dependent Picklist Selections
    • Actually, there is one limitation to your standard, non-programmer-type I.T. guy (like me); and that is that there are only two levels of dependencies available, standard.  If you want three levels, you'll have to get some custom programming done.  In this case, there actually isn't a dependency between 31-33, which is Manufacturing, and 331, 332, 333, 334, 335, 336, 337, etc.
    • But, next, here, you'll see the cool part — selecting 335 in the second box, only shows 335xxx values in the third box.  (And this 2-3 dependency is a whole lot more important than the 1-2 dependency because there are thousands of selections at the six-digit level of the NAICS code.
    • Dependent Picklist Selections
    • Now, to see how easy this is to program (not really programming for you and I), I'm going to use a simpler example:
    • Line of Business (Picklist Level 1) is either Microsoft, CollectSoft, or Other
    • Line of Business (Picklist Level 2) is then:
      • Microsoft – Dynamics CRM
      • Microsoft – Dynamics SL
      • Microsoft – Platform
      • Line of Business (Level 1) Picklist
      • CollectSoft (doesn't have a second level)
      • Other – ExactTarget
      • Other – CardScan
      • Other – c360
      • Other – Scribe
      • Other – Acronis
      • Line of Business (Level 2) Picklist
    • Create all of your custom attributes first, including picklist values, before you connect to the CRM Demo Tool!  (And don't forget to add the fields to your form and publish your customizations.)
    • Next, download the Microsoft Dynamics CRM Demo Tools program from
    • Download the executable to your server's desktop and run it:
    • CRM Demo Tools
    • Note that you have to "connect" so click on the link at the top of the page.
    • You'll get the connection box screen below:
    • CRM 4.0 Demo Tools Connection Dialog
    • Connect, and you're on your way.
    • Here's what to do next:
    • Click on the Dependent Picklist button, and populate the entity, Primary Picklist and Related Picklist fields
    • You're almost there.  With your first selection from picklist 1 high-lighted, select the associated values from picklist 2, and then click the map button, and so on, down the line.
    • You can preview your configuration:
    • When it looks right, click on the Get Script button.
    • Now you need to paste this code into the CRM Entity Form OnLoad Event, on the Form where the picklists will be used.  And you will paste the OnChange code into the OnChange Event for the Primary Picklist Attribute on the form.  Let's take a look:
    • OnLoad Event on Opportunity Form
    • Then, for the Line of Business (the Primary Picklist), we add the following code to the OnChange Event:
    • OnChange Event Code
    • Click Save and Preview your Customizations on the Form.
    • Publish your changes!

No comment yet, add your voice below!

Add a Comment

Your email address will not be published. Required fields are marked *