Sub topic 10
Global search, recent items, and favorites
This chapter assumes you know the basics of Lightning Experience: apps, the navigation bar, tabs, list views, and record pages. It covers three ways to reach a record without browsing to it: global search, recent items, and favorites.
Where global search lives
Global search is the search box at the top of every Lightning page. It searches across many objects at once, so you don't need to know which tab a record lives on. It is available in every app.
When you click the box, before you type anything, Lightning shows a short list of recently viewed records and recently searched terms. As you type, it suggests matching records and objects. Pressing Enter opens a full results page.
Reading the results page
The results page groups matches by object. The object you use most often is shown first, and a sidebar lists the other objects that had matches. Each group shows a few columns from that object, and you can select View All or pick the object in the sidebar to see more rows.
Some practical points:
- Search matches on text in searchable fields, such as names, email addresses, and phone numbers. It is not a database query, so it does not match every field.
- Search needs a few characters to work well, and very short terms return little.
- Wildcards help with partial terms. Use
*for any number of characters and?for a single character. For example,acme*finds names starting with "acme". - Newly created or edited records can take a short time to show up, because search relies on an index that updates after the save.
- You only see records you have permission to view.
Recent items
Lightning remembers the records and list views you have opened lately. You find them in these places:
- The search box, which lists recent records as soon as you click it.
- The Recent list view on an object home page, such as
/lightning/o/Account/list?filterName=Recent. - The Recently Viewed filter on a list view, which is the same idea at the object level.
Recent items are per user. They are good for returning to something you opened an hour ago, but older items fall off the list. If you need a record to stay reachable, use a favorite.
Favorites
A favorite is a saved shortcut to a page. You can favorite a record, a list view, or another page such as a dashboard.
To add one, open the page and select the star icon in the top right of the page header, then save it. To use favorites, select the star dropdown next to the search box and choose from the list. In that menu you can also edit the name of a favorite, reorder favorites, or remove them.
| Feature | Who controls it | Lifetime | Best for |
|---|---|---|---|
| Search suggestions | Lightning | Changes as you work | Finding something by name |
| Recent items | Lightning | Rolls off over time | Returning to current work |
| Favorites | You | Stay until you remove them | Pages you open every day |
Common problems
- A record doesn't appear in search. Check that you have access to it, that you spelled the term as it is stored, and that the record was not just created.
- Results are filled with the wrong object. Narrow the search with the object dropdown, or open the object in the sidebar of the results page.
- The star icon is missing. Not every page can be favorited, and an administrator may have turned the feature off.
Exercise
You open the same Account list view every morning, and you also need to get back to a Contact you looked at ten minutes ago. Which feature fits each task?
Show answer
Use a favorite for the daily list view, because it stays until you remove it. Use recent items for the Contact, because it appears in the search box when you click it and you don't need to save anything.
Exercise
You search for acme and the record you want is missing, although you know it exists. Name two likely causes and one way to narrow results when there are too many.
Show answer
Likely causes: you lack permission to view the record, or it was created so recently that the search index hasn't updated. To narrow results, choose the object from the dropdown next to the search box, or select the object in the results page sidebar.