Dynamics CRM 2013 – Feature Dive – Multi Select Option List

So you probably found this post as a result of a search for “Microsoft Dynamics CRM Multi Select Option List”, or something similar. Well, I have bad news and good news. This feature is still not a part of the 2013 release, but there is a workaround. No, not that Javascript hack that you found in all the other search results, that’s just gonna break on upgrade. No, its not that Dialog Box trick that seems like a goofy, non-intuitive way to do it. There is a fairly simple way to do this, that is intuitive, and does not use any foreign code that might break later.

Recently we were tasked with a migration from Salesforce.com to Dynamics CRM Online. Migrations can be challenging for a lot of reasons, but one of them is the fact that Salesforce.com has a multi-select “Picklist” field type. Microsoft’s “Option List” does not have a multi-select capability. But we had to migrate this multi select field over so we had to figure it out. The Javascript hack that is out there would not work for two reasons, first I do not condone “un-supported” methods and I know it will eventually break, and also we could not map to it properly even if we wanted to use it. Instead we used some in-built functionality that you can see yourself if you look at the Opportunities form. In the default installation, on the right hand side is a box called “Competitors”. This is simply a related lookup of another entity, but allows for the selection and display of multiple competitors. Many of you by now have figured out my “Super Secret” solution. But for the rest of you, here is how it is done:

Two steps: Create a new entity and populate it with your options and add the relationship to the entity you need, then display it on the form where you want it. Let’s take it step by step. Note, I will be showing this in the new CRM 2013 Online, but the same method will work in 2011 or on-premise deployments.

Step One

The first step is to create an entity for your list. You must have the System Administrator or System Customizer role to perform this task.

1. Go to Settings/Customize/Customize the System, click on Entities and then New and you will be presented with the dialog below. Create a display name and a plural name for this “list” and tick the “Settings” area to display so you can access this later for adding items, then click Save and the dialog box will refresh.

1

Now click “Fields” in the left sidebar and scroll down to “new name” and double-click it. New entities are created with a default name, this step is optional but it makes sense to use a relevant name

2

Edit the Display Name label to whatever your list items are called and Save and Close.
3

Back in the Entity Dialog click “N:N Relationships” in the sidebar and click New. Select the entity you want this list to appear in, (I chose Opportunities ) and Save and Close. (Note you can add additional N:N relationships to use this list in other entities, like a global list)

6

Click Save and Close, and Publish all Customizations
[divider]

Step Two

Go back to, in my case, the Opportunities entity, click Forms and double-click the Default Opportunity form, or whichever form you want to add the list to:

5

In the form designer, click in the form block where you want the list to appear, then on the Insert tab click to add a Sub-Grid.

8

Create a name, a label, select the list entity, uncheck chart and click Set, Save and Publish

9

Here you can see the block was added to the form, as you may know you can resize and drag this anywhere you want.

13

Now let’s take a look at our completed Opportunity Form. You can click the image to enlarge.

15

12Clicking the “+” gives you not only the option to select multiple items that you created earlier in the list, but you can also add new items on the fly which will then be a part of this list.

[divider]

Summary

In my opinion this is much more powerful than a simple multi-select list as each item in the list can be clicked to take you to that item’s information. While I only created an item name, I could have added more fields to the item entity to provide whatever additional information I wanted.

The best thing about this method is that it is “future-proof”, we have not introduced any third-party or foreign code so this will upgrade seamlessly.

In our Salesforce migration we were even able to map a Salesforce.com picklist to this related list lookup with no issues.

Feel free to give me your thoughts on this method in the comments below.

44 Comments

  1. Steven Kirtley

    Has anyone managed to implement this method of multi-select and update the values via the SOAP endpoint?

    I have a website where users can update their profile and write back to the CRM via SOAP…

  2. Caitlin Knox

    How can I dynamically add these to a marketing list. Say, if the ‘Notices’ is the secondary Entity I’ve created to specify if a Contact is marked to receive and ‘Office Clsore Notice’ as well as a ‘Billing’ notice [N:N to Contact Entity]. How do I add this criterion to populate a marketing list?

  3. Nancy Winburn

    I’ve just added this, and it does exactly what you claimed (thank-you). But I’ve got a few questions, that are necessary to make this multi-select option more usable.

    1) As Silas asked above, I’m looking to have this info reported on. I’ve attached this new entity to my company record, and I want to be able to see what companies (customers) are using the options I have assigned to them. When doing a report (or view) from the company entity I don’t see this new entity as a related options to add to my columns to display or to have as a field to specify a specific value to.

    2) Is there a way to suppress the date/time stamp on each entry that is added to the list? More info then needed

    Thank-you

  4. Chris

    You mentioned that you did this to migrate from Salesforce to CRM. I don’t know of a way that you could map the data from one to the other using this technique. Can you provide any insight on how you went about this?

  5. Chris

    I can’t find a way to use business rules to manipulate this field. For example, if one Line of Business option set is chosen, hide this field. It doesn’t appear as a field in the list.

  6. Nabeil

    Will this allow for any dependency? For example, let’s say we have Company and they serve industries A-H. Secretary Sally works for Company but only does work for industry B, C, and E. Could I create a dependent list based on the spec you have provided here?

      1. Ciaran OMaonaigh

        The multi select option set idea is problematic for the overall Dynamics crm way of modelling/presenting data relationships. Views, adv find, reporting etc as mentioned in several posts. The best way I can see to fit multi-select into the overall framework is to use standard HTML controls as input and represent the multiple values in some agreed way as text e.g. value1, value2, value3 (i.e. in a single text field). It’s certainly not ideal but flattening multiple values into 1 value means it sort of fits with the way the overall framework of the MS-supplied web app is designed. The lack of built-in support for such a common input element as multi-select makes me think the MS engineers realized the lack of framework fit with it and hoped people wouldn’t notice!

    1. Jason

      Josh – did you figure out how to incorporate these into a view? I thought about using workflow to populate a text field to be used by a view, but my new Entity is not seen as a related entity. I don’t even need to filter on the column…I just need to show it in the view.

      I am using it for contact and account classification (CPA, Lawyer, Client, Realtor, etc.)

  7. Kieran

    Thanks, this worked a treat for me.

    I also wanted to ask if it was possible to extend this a bit more?

    For example in Accounts I would like to add in a drop down to allow a user to pick a provider/a[partner for a service. Some providers will be existing accounts (eg Partners) while others will be competitors.

    Is it possible to use something similar to create a look up to allow a users to multi-pick from both accounts and competitor entities?

    thanks

  8. Roger

    If you want to be able to see the Many to Many relationship in the advanced find function, you will need to change the relationship display to something other than ‘Do Not Display’ in the relationship definition.

  9. Kiran

    I’ve a requirement where I’m showing a multiple items in a control, for this I’m using n-n relationship with the entity and its working fine. Now the issue is there is two buttons on the grid one is add item and another one is “See the records associated with this view” button.

    Please suggest how can I remove this button.

  10. Aaron

    I just finished a work around…lemme see if I can explain what I did.

    1)create an option set with the items you want to include.
    2)create an ‘additional field’ in the entity that points to the option set
    2a) create your list with a blank primary field and one each from the selected list fields
    3)Add the ‘additional field’ to all forms and views you want
    4)remove the primary key, named field from all views.
    5)create a business rule:
    if ‘primary name field’ is blank AND
    if ‘additional field = value of (check all list values)
    THEN
    LOCK the primary field
    and display an error (You can’t add to this list, please select something from the exisiting list)

    now to do the same with accounts, contacts and opps…oof

  11. Chris

    Carol,
    If you will have 10 or less values for users to choose from, you could go the route of using checkboxes instead. This will allow them to check multiple boxes AND you can still report against the data.

    Chris

    P.S. I said “10 values”, but it’s really up to you to determine how many checkboxes would make you form too “busy”.

  12. Ravi

    Hi,
    I have tried same approach but it is not working in my case because when i click on sub grid it only shows data on sub grid there is no lookup there for me to select multiple records.
    Regards
    Ravi

  13. Hi,
    I did this to relate contacts with firm events. It worked really fine (nice out-of-the-box solution Steve).
    But I need to be able to export this data within the contact data.
    Any thoughts?
    Tks!

    1. Reid

      Hello,

      How will this workaround work with either exporting or importing data? I would like to be able to show an export of my contacts with the multiple options displayed.

      If possible, can you bulk upload with this functionality? Or do they need to be individually selected every time?

      Thank you,
      Reid

  14. pearse

    Steve
    I have the exact question as Anthony. I am yet to do the upgrade. my javascript also will fail as I got a call from Microsoft. I want to implement your solution . Do I wait till the upgrade and then take out the old solution and implement yours. how about the data stored already. will it work if I use the same entity names. or should I export the data and bring back in.

  15. Anthony

    Steve,

    We’ve just been upgraded to CRM 2013 and our spot on, the java script I used for setting up a multi select field isn’t working. I want to implement your solution but I’m wondering if it’s possible to automatically populate the new entity with the data already stored in the multi select field?

    also would I need to create multi entities if i have more than 1 multi select field?

  16. Derrick Mathews

    I tried this approach before with CRM 2011 and it worked great, with one exception. Reporting.

    With a many-to-many relationship I couldn’t report on specific criteria to meet (option 1 AND option 2). It would only report on option 1 OR option2.

    I am assuming that due to the nature of a many-to-many relationship, this reporting issue is still seen in CRM 2013. Would that be correct?

    1. PeB

      Hi,
      i think i found a second exception.

      What if i Import (programmatically / via Interface) f.e. 200 or more opportunity instances … and every opportunity instance can have f.e. 200 instances of Multi Test.

      The Import would be very slow and susceptible for Errors or phases, where the Import will break or loose parts of the to create Connections.

      I think there are Limits to the capacity of natural fro and Speed of the System / Server, or not?
      What if someone publishes the System while another one imports many instances.

      we are on crm2013 onprem v6.1, but if we simply delete masses of instances f.e. 50000 instances, the System will work for hours on that.

      We create a solution for isurance-Broker-Business and we have a lot of rates. We think of changing the way we handle this.
      Till now, we created new fields for every rate, f.e. if fire, theft or water damage is insured or not .. we created for that 3 new fields…
      but we came now to the Limit of max. possible fileds in db.
      So we thougt about deleting all the rate-fields und make one field new_rate .. f.e. FIRE, and create a new instance for every new rate.

      What do others think about that?

      THX, greets PeB.

    2. Rebecca

      Had a client try out this approach to handle a need for several combo boxes as part of each lead entered into the CRM (client owns CRM so they wanted to handle adding/modifying/removing fields associated with each lead). My company simply utilizes the Dynamics API (2013) to send leads over from several website inquiry forms that we manage. We are experiencing an issue in Dynamics where when a lead is sent from the website via an inquiry form, Dynamics is actually inserting a new entries into the list of items available. So I end up with a duplicate list item option for every lead sent from the website inquiry form. Oddly enough the client does not experience this issue when manually adding a lead to Dynamics however there is a subtle difference in how they set the multi-select fields – the client is creating the lead with no multi-select fields set, saving the lead and then going back and setting the multi-select fields because they are unable to edit the multi-select fields when the lead is initially created.

  17. Pingback: Dynamics CRM 2013 – Feature Dive – Multi Select Option List - Forceworks Blog - Microsoft Dynamics CRM - Microsoft Dynamics Community

Add your 2 cents to my 2 cents and we'll have 4 cents!