Share

Preparing for 2011: Filtered Lookup in Microsoft Dynamics CRM 2011

One of the most commonly requested features in Microsoft Dynamics CRM has always been filtered lookup fields.  For example, say you replace country and state text fields with lookup fields—it is a very common request to filter the available states based on the country selected.

There are several unsupported ways to filter lookup fields in CRM 4.0; however, many of these approaches added complexity or broke standard CRM functionality, like the auto resolution of lookup fields.  A good supported approach is the Stunnware Filtered Lookup  add-on; however, for some implementations that just needed simple filtered lookups in one or two places, it could be hard to justify purchasing add-ons.

CRM 2011 has taken a major step forward with the introduction of filtered lookup fields.  In this example, I want to filter the Case form “Responsible Contact” lookup to only include the contacts associated with the selected Case account.

From the case form customization view, I’m going to select the “Contact” field.

image

By clicking the “Change Properties” button, I will see the field properties for the contact lookup. 

image

Under the Related Records Filtering section of this form, I can check a check box that will filter the available values of this lookup field to records related to the value selected in another lookup field.  In this example, I said to only show contacts contained in the case account.

image

Note that I can select whether or not to allow users to turn off the filter—this gives me the ability to choose whether my filter is “hard,” limiting my users to just the filtered records, or “soft,” allowing users to select something outside of the filter.  This is important because some filters are there to prevent users from selecting invalid record combinations, while others are there for user convenience, but may need to be overridden for exceptions.

Considerations

I’m very excited to see solid filtered lookup functionality in Microsoft Dynamics CRM 2011, and I think it will be very useful to make forms more user friendly and less cumbersome.  New functionality like this and also the ability to delete form navbar items has made it possible to reduce much of the form jscript in many crm 4 to 2011 upgrades.

I also don’t expect the out of the box functionality will solve every filtered lookup challenge.  The functionality works great for standard filtering where you want the value of one lookup on the form to filter the options available in another lookup field; however, in cases where the filtering logic are more complex (filter the options in one lookup based on a combination of variables from multiple other lookups, or based on attributes on a related record), there will still be value in products like the Stunnware Filtered Lookups.