Tuesday, April 28, 2015

Filters - Good for Coffee and Good for Salesforce



When I search for something on Amazon, one of the first things I do is start adding "filter by" values.  For example, I might be looking for a case for my Samsung S5 phone.  I'd first set "Prime Eligible", then "Under $25", and finally, "4 stars and above".  Why do I do this?  To make the selection process faster and easier, by eliminating choices that don't make sense in this situation.

Similarly in Salesforce, we often ask our users to make choices.  We ask them to use a lookup and decide who the "Primary Contact" is for an account or on the opportunity object to pick an account name.  The Lookup Filter let's us help narrow the available values, speeding their usage and guiding them to the correct choices, as defined by the system administrator.

Take the lookup of an account on an opportunity.  Wouldn't it be helpful if instead of 23,458 accounts, they were presented with only the 138 that were record type Client and Active?  Of course it would be!  This is a prime example of the proper use of a lookup filter.

When setting a Salesforce lookup filter, we're faced with some choices.

1.  Is the filter mandatory or optional?  If optional, the user can click Show All and then see every value and pick one, regardless of the filter in place.  If mandatory, the user cannot override it.  If this is the case, you must provide a clear error message, including someone to contact for help!  Can't emphasize that enough.  Don't leave a frustrated user hanging.

2.  What values go in the filter?  Salesforce has a wizard that tries to guess what you want, but like most wizards and weathermen, it's not always accurate.  Define your filter carefully to only present valid choices.  If possible, make it optional, particularly if you anticipate edge cases and exceptions.

Further details and the exact instructions to build lookup filters can be found here.  They're a powerful tool, but can be tricky.  If you're not comfortable building these filters on your own, check with a Salesforce consultant for assistance.

Comments?  Suggestions?  Sound off below!

Google+ Followers