Sub topic 4
Tabs and Object Home Pages
This chapter assumes you know what an object, a record, and a field are. It also assumes you can sign in to an org (a Salesforce environment) as a user who can see standard objects such as Accounts and Contacts. You should already know that an app groups navigation items and shows them in a navigation bar. Here you will look at one kind of navigation item, the tab, and at the page it opens, the object home page.
What a tab is
A tab is a navigation item that opens a specific destination. In Lightning Experience, the most common tab opens an object. Clicking Accounts in the navigation bar opens the Accounts object home page. Other tabs open a Lightning page, a Lightning component, a Visualforce page, or a web address.
Two ideas are easy to mix up:
- A tab is a definition. An admin creates it once for an org, and it controls who can see it.
- A navigation item is the entry in a particular app's navigation bar. An app lists the tabs it wants to show, in the order it wants them.
So one tab can appear in many apps, and an app can leave out a tab that exists in the org.
The table below lists the main tab types.
| Tab type | What it opens | Example |
|---|---|---|
| Object tab | The home page of a standard or custom object | Accounts, Contacts |
| Lightning Page tab | A custom Lightning page built in App Builder | A sales dashboard page |
| Lightning Component tab | A single Lightning component | A custom search tool |
| Visualforce tab | A Visualforce page | A legacy form |
| Web tab | An external URL or a page inside an iframe | An internal wiki |
Tab visibility
Whether you can see a tab depends on more than the app. Three settings interact:
- The profile or permission set. The tab setting is Default On, Default Off, or Tab Hidden. If the setting is Tab Hidden, the user does not see the tab.
- The app's navigation items. The app has to include the tab in its list.
- Object permissions. If you cannot read the object, an object tab will not give you access to records.
A common support question is "I cannot find the Accounts tab." Check the three layers in this order: the user's object permission, the tab setting, and then whether the current app lists it. If the tab exists but is not in the current app, the user can still reach the object from the App Launcher, which you saw in an earlier chapter.
The object home page
When you click an object tab, you land on the object home page. For most objects it is a list view page. The page shows:
- The object name and an icon in the page header.
- The name of the current list view, with a dropdown to switch to another one.
- Buttons such as New and Import. Which buttons you see depends on your permissions and on the object.
- A search box that filters the current list.
- The table of records, one row per record.
The object home page remembers the last list view you used. That is why you often open Accounts and see a view you chose days ago. Salesforce stores this choice per user and per object.
Some objects have a different home page. For example, Tasks and Events show their own layouts, and a custom Lightning page can replace the default. An admin can also change what an object tab opens by assigning a different page in the Lightning App Builder.
Opening an object without a tab
Sometimes the object you want is not in the current app. You have three options:
- Open the App Launcher and use the All Items section. Search for the object by name. Clicking it opens the object inside the current app, though the object does not appear in that app's navigation bar.
- Switch to an app that includes the object.
- Use global search and pick the object name from the results.
When you open an object this way, the navigation bar shows the item for the current visit. It is not added permanently. To keep it, a user can personalize the navigation bar, which a later chapter covers.
Reading what the object home page tells you
The page gives several signals that help when you troubleshoot.
- The list view name. If you expect to see 200 records and see 12, check the list view name first. The view might be filtered, such as "My Accounts".
- The record count. Under the title you will see text such as "12 items". Lists show a limited number of rows at a time and load more as you scroll.
- The sort indicator. A small arrow next to a column header shows which column drives the order.
- The filter indicator. A funnel icon shows that filters are active and lets you edit them.
A list view is a saved query. The next SOQL query returns the same rows as a list view that filters Accounts by Industry and sorts by Name. SOQL is the Salesforce Object Query Language.
SELECT Id, Name, Industry
FROM Account
WHERE Industry = 'Technology'
ORDER BY NameThis mapping is useful. The filter becomes the WHERE clause, the sort becomes ORDER BY, and the visible columns become the fields in SELECT. The list view also applies sharing rules, so two users running the same view can see different rows because each user has access to different records.
Object home URLs
Each object home page has a stable address. The first line below opens the Account list view named Recent. The second opens the view page of one Account, where 001XXXXXXXXXXXXXXX stands for a real record Id.
/lightning/o/Account/list?filterName=Recent
/lightning/r/Account/001XXXXXXXXXXXXXXX/viewIn the first address, o means object and list is the action. The filterName parameter selects the list view. Its value is either a standard name such as Recent or the Id of a list view. Because the address holds the view, you can bookmark it or share it with a colleague who has access. A later chapter on URL patterns goes through this in more detail.
Common errors and edge cases
- The tab is missing for one user only. The user's profile or permission set probably sets the tab to Tab Hidden, or the user lacks Read access on the object.
- The page opens a different list view than expected. Salesforce restores the last view you used. Pick the view from the dropdown, or use a URL with
filterName. - A link returns "Insufficient Privileges". The link is valid, but the user cannot view that record or object. Sharing, not navigation, is the cause.
- The tab opens a page that looks different from other objects. An admin may have assigned a custom Lightning page to the tab, or the object type uses a special home page.
- A web tab shows a blank frame. Many sites forbid being shown inside another page. Use a link that opens in a new window instead.
- A custom object does not appear in the App Launcher. Its tab may not exist. A custom object needs a custom tab before it gets a tab-based entry in an app.
Try it yourself
- Open an app that includes Accounts. Click Accounts and note the list view name and the item count.
- Switch the list view to All Accounts and open the funnel to see its filters.
- Copy the address from your browser and compare it with the
/lightning/o/Account/listpattern. - Open the App Launcher, search All Items for an object that is not in your app, and open it. Check whether it appears in the navigation bar.
Exercise
A user says the Contacts tab is gone from the Sales app, but a colleague on the same app still sees it. Name the three layers you would check, in order, and say which one a Default Off setting affects.
Show answer
Check (1) the user's Read permission on the Contact object, (2) the tab setting on the user's profile or permission sets, where Tab Hidden removes the tab, and (3) whether the Sales app lists the Contacts tab. A Default Off setting affects only the second layer, and only means the tab is not shown by default. The user can still reach Contacts through the App Launcher.
Exercise
Two users open the same list view, Technology Accounts sorted by Name. One sees 40 rows and the other sees 15. The view definition is the same. What is the most likely reason, and how does it relate to the SOQL equivalent?
Show answer
Sharing. The list view applies the filter (the WHERE clause) and the sort (ORDER BY) the same way for both users, but it returns only records each user can access. The user who sees 15 rows has access to fewer Account records.
Exercise
What does the URL /lightning/o/Account/list?filterName=Recent do, and why is it useful for a bookmark?
Show answer
It opens the Account object home page with the Recent list view selected. The o segment means object, list is the action, and filterName picks the view. Because the view is in the address, the bookmark opens the same view every time instead of the last one the user opened.