Tune into the Lightning Experience Pro Tips blog series to learn about setting up Lightning Experience and how to avoid common gotchas along the way.
If your org uses lookup search in Salesforce Classic, you know that learning all the different lookup terms, and getting everything set up, can be complicated. Happily, for you and your users, lookup search in Lightning Experience is simpler…and more powerful. But you’re probably wondering what you need to do to transition your existing lookup search configuration to the new interface.
In this post, we’ll look at how much easier it is to set up lookup search in Lightning Experience. And, we’ll walk through the way your org’s existing lookup filters apply—and don’t apply—in the new interface. But first, let’s review some lookup search terms and basics so we’re on the same page.
Lookup Search 101
In Salesforce, lookup fields allow users to associate two records together in a relationship. For example, a user can associate a contact record to an account record using the Account Name lookup field. When users edit a lookup field, they need to find the right record to associate. That’s where Salesforce lookup search comes in.
Lookup fields in Lightning Experience (top) and Salesforce Classic (bottom). You can spot lookup fields by the magnifying glass icon to the right.
Lookup searches are different in Salesforce Classic and Lightning Experience. In Salesforce Classic, there are two types of lookup searches:
- Standard—Searches a limited set of fields for each object, such as the name field. Results are limited to 50 records at a time. Users can’t sort, filter, or customize the columns in the results.
- Enhanced—Searches more fields for each object. Search queries are broken into separate search terms for better results. Results don’t have a limit, and users can refine results. Requires setup by you.
In Lightning Experience, there’s only one type of lookup search. We’ve taken the best of Salesforce Classic enhanced lookup search and brought it to users all the time, on all searchable objects. In Lightning Experience, lookup search acts a lot like global search.
- As users type a search term, they see instant results that suggest matching recent items or records.
- When users press Enter to perform a full lookup search, all searchable fields are searched.
- Search features like spelling correction are applied. (Depending on the object you’re searching, not all search features are applied, so check out “Why Am I Seeing Search Results for Similar Terms?” for the full story.)
- Full search results are sorted by relevance to show users the best results at the top.
- Users can sort full search results by clicking on the column headings and by relevance.
And here’s the best part about lookup search in Lightning Experience: your users get all this goodness without you having to lift a finger to set up or customize things. Hard to believe? Let’s take a closer look at how your life is easier in Lightning Experience.
Better for You
If you’ve ever configured lookup search in Salesforce Classic, you know it involves many steps and can be time-consuming. Let’s compare those steps with what you need to do in Lightning Experience:
What About Filters?
It may be fast to set up lookup search results pages, but what about the tricky business of search filters? Let’s walk through the different types of filters that you may be familiar with from Salesforce Classic and see how they apply in Lightning Experience.
Lookup Filters (aka Related Lookup Filters)
You define lookup filters, also known as related lookup filters, to restrict the valid values and search results for lookup fields. These filters are designed to limit the number of results that users see in lookup search results, making it quicker and easier to find the right record. Users don’t see that a lookup filter is at work, but they’ll appreciate the results.
How about some examples of lookup filters?
- Account Name field on opportunities should only show accounts with a Customer Account custom record type.
- Account Name field on cases should only show accounts that have a billing country of USA.
- Position field on job applications should only show positions that are open.
A dependent lookup is a lookup field with a lookup filter that specifically references a field on the current record (also called the source). It’s a subtle difference from related lookup filters. Think of dependent lookups as dependent on the record at hand. They’re quite needy fields.
Here are some examples of dependent lookups:
- Account Name field on contacts should only show accounts that the user owns.
- Contact Name field on cases should only show contacts associated to the account specified in the case’s Account Name field.
Lookup Filter Fields (aka User-Defined Filters)
This is another type of filter that you can define, but unlike with lookup filters, it’s up to users to decide how and when to apply them. You configure which filter fields you want displayed in Salesforce Classic (in lookup filters and My Columns) by changing the lookup filter fields on the search layout page.
So with that little review out of the way, how do these different filters apply in Lightning Experience?
Lookup filter fields aren’t available in Lightning Experience. (If you’ve run the Lightning Experience Readiness Report, it calls these filters “user-defined lookup filters.”) To which you may ask, Won’t my users miss filtering their lookup search results when they work in Lightning Experience? Our answer is No! Because of the improvements we’ve made to search in Lightning Experience, users don’t really need these filters anymore. We’ll show you why a little later on.
Both types of lookup filters—related lookup filters and dependent lookups—are available in Lightning Experience as well as Salesforce Classic. (The Lightning Experience Readiness Report refers to these filters as “admin-defined lookup filters.”) You can create lookup filters from either interface. And the existing filters that you added in Salesforce Classic automatically apply when users work with lookup fields in Lightning Experience—in both instant results (including recent items and suggested records) and full search results.
Note: If you have a Readiness Report that says admin-defined lookup filters need to be recreated in Lightning Experience, that’s old news that you can safely ignore!
Define Lookup Filters
The process for defining lookup filters is the same in both interfaces, although there are a few subtle differences in Lightning Experience.
- In Setup, from the management settings for an object, select Fields & Relationships (in Lightning Experience) or Fields (in Salesforce Classic).
- Edit the lookup field that you want to apply the filter to. Salesforce only supports lookup filters on selected objects.
- In the Lookup Filter section, click Show Filter Settings.
- Specify the filter criteria a record must meet to be a valid value. Click Insert Suggested Criteria and choose from a list of suggested criteria, or manually enter your own criteria.
5. Specify whether the filter is required or optional in Salesforce Classic. This allows the user to decide if they want to search all results instead of just the filtered results. Lightning Experience doesn’t have a Show all results view, so filters are always required in the new interface.
6. For required lookup filters, specify whether you want Salesforce to display the standard error message or a custom message when a user enters an invalid value.
7. Leave the Enable this filter checkbox selected. Save your changes.
Tip: Be thoughtful when applying filters. We recommend taking a look at your existing filters to make sure they’re not overly restrictive. Even when filters are applied, broad search terms can match more records than can be returned, preventing users from finding the record they’re looking for. If users are encountering this issue, ask them to enter more specific search terms to see more relevant results.
Better for Users
Search in Lightning Experience is more intelligent and gets your users to the right results faster. This is true for lookup search as well as global search. And it’s why your users won’t need lookup filter fields when they’re working in Lightning Experience.
Before users even get to a search results page, instant results in Lightning Experience provide a more robust and relevant view of more objects than in Salesforce Classic. When a user clicks in a lookup field, a dropdown menu shows recent items. So potentially users can associate records in one click. Users looking to associate records quickly are sure to appreciate this enhancement.
Lightning Experience also helps orgs with a common lookup search conundrum: lots of records with similar names. With the secondary fields that display in instant results, users see additional, contextual information right under the record name. For example, in the above screenshot, the account phone number is displayed for the Acme and Global Media accounts.
We’ve made it easy for you to control which field appears as the secondary field. It’s simply the second usable field in the object’s search results layout. For more information about the secondary field and which fields aren’t usable this way, check out Instant Results in Lightning Experience in Salesforce Help.
But let’s get back to our Lightning Experience user. As the user starts typing in a lookup field, the instant results list adjusts to show records that have matches in the Name field. Records include recent items, items from the user’s most frequently used objects, and items from the current object. (It’s also possible to search in a specific object or create a new record. The one-click options keep piling up!)
If the user doesn’t see what they’re looking for in instant results, they can press Enter and see full search results. They’ll find themselves on a sleek search results page, with the ability to sort records by clicking on the column headers.
Now, let’s return to our earlier statement that your users won’t need lookup filter fields when they do lookup searches in Lightning Experience. This is because full lookup search results in the new interface are more relevant out of the box than what users typically get in Salesforce Classic.
- First of all, a full lookup search always looks through all of the searchable fields for all searchable objects. Searching through more fields eliminates the need for guesswork and helps prevent missing records in the results.
- Additional features like nicknames, spelling correction, and lemmatization are applied, making results even more relevant without users doing anything.
- And, finally, Salesforce search uses smarts to determine which records are most relevant to the user and displays them at the top of the results, making it fast and easy to spot the right information.
Basically, lookup search in Lighting Experience is like a tiny version of global search. And all these great search features mean users are more likely to find what they’re looking for without needing to waste time applying filters to their lookup searches.
Creating Super Searchers by Sharing Tips
As you can see, we’ve done a lot of work to make all aspects of searching in Lightning Experience smarter, faster, and more productive. But at the end of the day, the user’s search term itself plays a big role in getting back the best results. To help your users see more relevant results and troubleshoot pesky search issues, share these tips as part of your Lightning Experience training.
- Enter a more specific search term if there are too many results. For example, enter the full name and company (Mike Jones Salesforce) or last name and zip code (Jones 94123). The more specific the search term, the better the results are.
- Avoid wildcards (Mi or M?ke for Mike) and partial terms (Ac for Acme).
- Check the search term’s spelling and that the search term is complete.
- Wait a few minutes for the record to be made searchable if it was recently created or updated. If a new or updated record isn’t available after 15 minutes, tell the user to contact you. And remember, not all fields on a record are searchable.
- We only show the records that a user has permission to access.
Give Lightning Experience Lookup Search a Try
We’ve gone over a lot of information about lookup search. For a good summary, check out the terminology, definitions, and UI availability details in How Do I Search in Lookup Fields? in Salesforce Help.
We’re sure you’ll enjoy how much easier lookup search setup is in Lightning Experience. And that your users will appreciate the improved search experience that’s waiting for them. Good luck with your transition to the new Salesforce!