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

Increase Dynamics CRM Online Scribe Data Migration Performance

Slalom Consultant Jayson Goldinger

Jayson Goldinger is a Slalom Consultant based in Denver, CO, and a member of the Slalom National CRM practice. His work revolves around Microsoft Dynamics CRM including configuration, customization, report development, and integration. He is also recognized as a Scribe MVP.

For those of you who have done data migration or integration with Dynamics CRM Online, you know that the performance may be a challenge. I recently faced that challenge during a recent project.

I had approximately 52,000 account records with associated contacts to import. I also needed to do a check (Seek Step) against CRM to see if the record was already in CRM. I was using Scribe Insight with my source being Excel and my target was Dynamics CRM Online using the Dynamics CRM Adapter. On my first attempt my job ran for 9 hours and only imported approx. 15,000 records. At that rate it would have taken over 30 hours to complete. That rate is not really acceptable. It also potentially adds other issues like the connection being dropped after some period of time and then I would have to restart the integration. Some of my colleagues have said they have seen the Dynamics CRM connections dropped around the 8 hour mark.

The question then becomes how to combat this issue. Continue reading and I’ll explain how I was able to increase the performance from about 30 source records per minute to an average of 200 source records per minute. I say source records because in the job that I am discussing each source record may create one or two records. Read more of this post

Controlling Ribbon Buttons with Jscript in Dynamics CRM 2011

Slalom Consultant Jayson GoldingerCRM 2011 has been out for some time now and I finally had a project where I had a chance to really dig into the functionality of the ribbon. In reading through the software developers kit (SDK), I quickly realized that the Ribbon Enable Rules are somewhat limited in functionality. However, Microsoft left the door open for us to use jscript where the XML will simply not suffice. The use of jscript (and some FetchXML) gives us quite a bit of flexibility that we need out in the implementation world. Let’s walk through how this works…

For the sake of this blog post, I am going to make the assumption that you have a basic understanding of the RibbonDiffXML. In the CommandDefinition for the button you will see the EnableRules. You can have several rules and if any one of the rules returns False, the button will be disabled. You can get to the CommandDefinition for custom buttons by looking in the customizations.xml or you can find the CommandDefination for standard buttons on standard entities in the SDK. Here is a sample of a button’s CommandDefinition; this one is for the standard “Deactivate” button on the Account Entity pulled from the SDK. The highlighted line of the XML is a custom EnableRule that I created. Read more of this post

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

Dynamics CRM 2011 Report Development using FetchXML

Slalom Consultant Jayson Goldinger

Jayson Goldinger is a Slalom Consultant based in Denver, CO, and a member of the Slalom National CRM practice. His work revolves around Microsoft Dynamics CRM including configuration, customization, report development, and integration. He is also recognized as a Scribe MVP.

The inability to have custom reports was one of the biggest drawbacks of Dynamics CRM online when it was first released. Fortunately Microsoft has addressed this issue in the release of Dynamics CRM 2011. However, there is one small catch. The catch is that you have to use FetchXML (which is a proprietary query language that is used in Microsoft Dynamics CRM) for your SRS report query.

In my opinion one of the most powerful features of reporting in Dynamics CRM is the ability to use Advanced Find to “pre-filter” the data sent to the report. As a report writer of a number of years, I was always frustrated by the moving target of parameters that a user might request. When you get more than two or three, the report becomes a little difficult for the end user to use. By taking advantage of the “pre-filtering” with Dynamics CRM and Advanced Find the options of parameters become almost infinite and as a developer I only need to worry about one thing–setting up the option of “pre-filtering” in my report. It may seem like a difficult task but it is actually quite simple. I’ll walk through the steps. Read more of this post

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

Woot – I Got Published!

Slalom Consultant Derek Martin

Slalom Consultant Derek Martin is an accomplished Microsoft systems developer and integrator, experienced in developing and deploying SharePoint and CRM solutions, integrating line of business applications, and leveraging existing infrastructure investments.

Can I brag?  I was very excited to learn today that I got published – TWICE!  It isn’t my first time being published but is exciting none-the-less! Check me out:

Here (whitepapge: The Challenges of Multitenant-aware CRM Instances with Entity and Function Commonalties)

and

Here (Top 6 Misconceptions About Cloud Computing–I wrote the six myths although it doesn’t have my name on it).

Pretty excited – it has inspired me to write up some more stuff…any topic suggestions?

PS – Just talked to my mom – she’s proud :)

Follow

Get every new post delivered to your Inbox.

Join 129 other followers

%d bloggers like this: