Create Multiple Selection Picklists in Microsoft CRM

By using the onchange command on a picklist field along with a text or memo field, you can easily create the ability to capture multiple picklist values for situations where one value is not sufficient. For example, you may have a list of Account types and want to identify some Accounts as both customers and partners.
To do this, we create a picklist of the values and then write java script behind the picklist to concatenate selected values to the memo field. Our memo field will become the list of the multiple values we have selected from the picklist. Lets’ look at an example where we want to simulate a list of Contact categories like we might use in Microsoft Outlook.
First, we’ll create a memo field called Categories (CFMCategories). Then we’ll create a picklist field called CategoryList (CFMCategorylist). We then add our values to the picklist. Next, we edit the onchange function from the ‘events’ tab under the field ‘properties’ window and add the java script (shown below) that adds the selected value of the picklist to the memo field each time a value is selected.

var strCategories;var strCategoryList;
strCategoryList=crmForm.CFPCategoryList.value;
strCategories=crmForm.CFMCategories.value;
crmForm.CFMCategories.value=strCategories+”,”+strCategoryList

With our fields and java script in place, each time we make a selection from the picklist field ‘CategoryList’, that selection is added into the memo field labeled ‘Categories’.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s


%d bloggers like this: