Multi-Select Option Sets: Part 2

Today I’m going to revisit one of my more popular posts: Multi-Select Option sets. This little JavaScript hack is a great way to present the selection of multiple option set values. The biggest problem with it is that it is absolutely not a supported customization, and with the latest release of CRM the previous implementation has started to break for many people.

Some of the great consultants here at Slalom, Ashwin Ravi and Deene Ogden, have converted the multi-select solution into a managed solution that implements this as a web resource, making it easier to deploy—and more important, 100% supported! That being said, here’s how to use the solution (found at the end of this post):
Place two fields on the form (an option set and a text field). Be sure to hide them after they’re on the form.Add the Multi-Select web resource to the form. In the parameters section, put the schema names of the fields you just created. The order matters, so put the option set first, then the text field. Note: Don’t include a space after the comma or you’ll get errors.

Go to the form properties and add the MultiSelect_OnSave.js library.

Finally, add an OnSave event referencing the Multi-Select library and pass the name of the web resource you inserted on to your form. If you need to add multiple Multi-Selects, then just create multiple OnSave events with each one referencing the different resources.

And that’s all there is to it! Here’s the solution. Happy CRM’ing! As always, this code is provided as-is and on warranty.

MultiSelectwOptionSet_1_0_3_managed

Filtering Option Sets

Slalom Consultant Xavier Vargas

Xavier Vargas has worked as a CRM consultant with focus on the Microsoft Dynamics CRM platform for the last seven years. He currently works for Slalom Consulting helping build and maintain a first-in-class team in Dallas that enables his clients to win on all of their CRM initiatives and strategies.

Recently we ran into the need to filter option sets dynamically based on what Business Unit a user is in. Imagine the scenario where you have a dozen or so business units, each with a unique sales process. If you want to leverage the out of the box reporting and use the Sales Stage field, you’ll soon find that you have 50+ values in that drop down. At best this is a nuisance for end users, at worst an end user might end up inadvertently selecting an invalid value.

The following snippet of code allows us to filter an option set based on the passed in Business Unit name. An array of values is selected and any value in the option set that is not in the array will be removed. The result is a nice and tidy drop down with only those values we need:

Slalom Consulting - Xavier Vargas: Filterine Options Sets

Happy CRMing!

Slalom Consulting’s Dallas office Slalom Consulting's Project & Program Management focus
Learn more about our Dallas office Learn more about Slalom Consulting Customer Focus

subscribe by emailSubscribe to be emailed about new CRM posts

Delete Field Data Via Workflow in Dynamics CRM

Mass edit is a great feature in CRM. You can run an Advanced Find to query for a list of potential records to update and edit on the fly. The only problem with this arises when you want to delete data. Unfortunately, the mass edit is additive, so any edits will be to add data, not remove.

Slalom Consultant Xavier Vargas

Slalom Consultant Xavier Vargas has worked with Enterprise CRM customers in numerous verticals. Based in Dallas, He has also delivered training engagements as an MCT (Microsoft Certified Trainer).

Enter the workflow. Through the use of a simple workflow, we can go in and selectively delete field data.

Create a new workflow that is run on-demand. In the workflow, add one step to update record. Within the properties, highlight the field you’d like to clear, then select the “Clear” value from the dropdown on the right.

Highlight field

SELECT CLEAR ON THE RIGHT

Select 'Clear'

THIS IS WHAT THE FIELD NOW LOOKS LIKE

The finished workflow should look like this: Read more of this post

CRM Field Masking with JQuery

Slalom Consultant Xavier Vargas

Slalom Consultant Xavier Vargas has worked with Enterprise CRM customers in numerous verticals. Based in Dallas, He has also delivered training engagements as an MCT (Microsoft Certified Trainer).

It’s always a good thing to make the user experience as nice as possible. One thing missing from CRM is the ability to mask fields. You’ve probably seen this online on sites that ask for your phone number or social security number where the text box already contains the hyphens in the necessary spots.  This clues the user in as to what format you’re expecting from them and leads to cleaner data.

Recently I had a client that needed all their zip codes to be entered along with the carrier code, which is the 4 number suffix at the end of a zip code. I figured this would be a great opportunity to implement some field masking.

Using a JQuery masking plugin written by Josh Bush (which he has also posted as a GitHub project) I was able to add a single line function to define my masking. To do the same, download this file and upload it to your CRM system as a web resource. Disclaimer: neither I nor Slalom Consulting has any relationship with Mr. Bush or his code—before using it please examine and evaluate the code yourself to determine whether it is suitable for your use, and use at your own risk.

Next, jump onto the form that you want to add a field mask to and add Read more of this post

Multi-Select Option Sets in Dynamics CRM: Part 1(See Part 2 for the Latest Code)

Slalom Consultant Xavier Vargas

Slalom Consultant Xavier Vargas has worked with Enterprise CRM customers in numerous verticals. Based in Dallas, He has also delivered training engagements as an MCT (Microsoft Certified Trainer).

*I’ve recently published an update to this post with a new fix. The code in this post is now obsolete; please visit my latest post for the new workaround.

To start off this blog, I figured I’d show you a new twist on an old trick. Microsoft Dynamics CRM doesn’t support multi-select option sets out of the box. In order to create one of these fields, we have to do a bit of JScript hackery. This is all completely unsupported but gets the job done.

So let’s jump right in. First thing you’ll need to do is create the option set that you want to convert to a multi-select:

Create your option set

`

Define the option set values

`

Next we’ll create a shadow field that will actually hold the Read more of this post

Follow

Get every new post delivered to your Inbox.

Join 126 other followers

%d bloggers like this: