Sub topic 3
The navigation bar and its items
Prerequisites and scope
This chapter assumes you know what an object, a record, and a field are. It also assumes you can sign in to a Salesforce org, such as a Developer Edition, as a user who can see standard objects like Accounts and Contacts. The previous chapter covered apps and the App Launcher. Here we look at what sits inside an app: the navigation bar and the items on it.
By the end you should be able to describe what a navigation item is, tell the item types apart, read the behavior of the bar, and explain why two users in the same app can see different items.
What the navigation bar is
The navigation bar is the horizontal strip across the top of Lightning Experience, directly under the global header. It belongs to the current app. When you switch apps in the App Launcher, the bar is replaced with the one defined for the new app. The app name appears at the left edge, and the items follow it.
An app is mostly a named list of navigation items plus some branding and utility settings. The navigation bar is how that list is displayed. Two apps can contain the same item, for example Accounts, and each app can place it differently.
The bar is made of three parts:
- The app name, which opens the app's default landing page when selected.
- The navigation items, which are the clickable entries.
- The More menu, which holds items that do not fit in the available width.
Navigation items
A navigation item is one entry in an app's list. The common item types are described below.
| Item type | What it opens | Example |
|---|---|---|
| Object tab | The object home page, which shows a list view | Accounts |
| Lightning page tab | A custom Lightning page, such as a home or app page | Sales Dashboard Page |
| Web tab | An external web address inside Salesforce | A company wiki |
| Visualforce tab | A Visualforce page | A legacy page |
| Lightning component tab | A Lightning component that has been exposed for tabs | A custom tool |
Most items are object tabs. Selecting one lands on the object home page. The next chapter covers object home pages in detail. For now, remember that an object tab is a navigation item whose target is an object.
Home and other fixed items
Many standard apps start with a Home item. It opens the Lightning home page for that app. Some apps also include items that are not objects, such as Dashboards or Reports, which are themselves object-style tabs that lead to their own home pages.
The More menu and overflow
When the browser window is narrow, or the app has many items, the bar shows as many as fit and moves the rest into a More menu. The menu lists the remaining items in order. Two consequences follow:
- The same app can look different on a laptop and on a wide monitor, because the cut point depends on screen width.
- An item in More is still a full navigation item. It behaves the same way when selected.
Item visibility
Not every user sees every item. An item appears on a user's bar only if all of the following hold:
- The item is part of the app's configured list.
- The app is assigned to the user's profile or permission set.
- For an object tab, the user has the access that makes the tab visible. A tab can be set to Default On, Default Off, or Tab Hidden through profiles and permission sets.
- The user has permission to read the underlying object.
This explains a common support question: "My colleague has a Contacts item and I do not." The cause is usually a profile or permission set difference. It is rarely a bug in the app.
How the bar changes as you navigate
The bar highlights the item you are currently under. Selecting an item changes the main page area but not the bar itself. If you open a record, the matching object item stays highlighted, so you keep your place in the app.
A record can also be opened from outside the app's items. For example, a search result for an object that is not in the current app opens normally. In that case no item is highlighted, because the record's object is not on the bar. This is one reason you may feel "lost" in an app. The record is available, but the bar has nothing to mark.
Each object tab item can also show a small arrow beside its name. Opening it shows quick choices, such as recently viewed records of that object and a New action. The exact choices depend on the object. Use it to jump to a recent record without visiting the object home page.
Reading the bar like an administrator
Knowing the item types helps you diagnose what you see. A short checklist:
- Identify the current app from the name at the left of the bar.
- Check whether the item you want is on the bar or inside More.
- If it is missing, open the App Launcher and look under All Items. If it is there, the current app does not include it.
- If it is missing from All Items too, suspect tab visibility or object permissions for your profile.
The App Launcher's All Items view lists every object and item you can reach, whether or not the current app includes it. This makes it the quickest way to separate "not in this app" from "not available to me."
Connecting items to URLs
Selecting an object tab leads to an object home page, and that page has a stable address. You can read the address in the browser bar. This is the same pattern that a later chapter covers in full.
/lightning/o/Account/home
/lightning/o/Account/list?filterName=RecentThe first address is the Account object home page. The second opens the Account list view named Recent. The o segment means object page. Because a navigation item is just a link to a destination, you can bookmark these addresses to reach the same place without the bar.
Navigation items for developers
A navigation item is declared by an administrator, not by code. Developers can still send users to the same destinations. Programmatic navigation is covered later in this tutorial, but it is useful to see that the object tab and the code target the same thing.
The following component opens the Account object page, which is the same destination as selecting the Accounts item on the bar.
import { LightningElement } from 'lwc';
import { NavigationMixin } from 'lightning/navigation';
export default class OpenAccountsHome extends NavigationMixin(LightningElement) {
openAccounts() {
this[NavigationMixin.Navigate]({
type: 'standard__objectPage',
attributes: {
objectApiName: 'Account',
actionName: 'home'
}
});
}
}The type value selects the kind of destination. The attributes object gives the object and the action. Selecting the Accounts item and calling this method both end on the same page.
Common errors
| Symptom | Likely cause | What to check |
|---|---|---|
| An expected item is missing from the bar | The item is not in the app, or the tab is hidden for your profile | App Launcher All Items, then profile and permission set tab settings |
| The item exists but sits in More | The window is too narrow, or the item is late in the order | Widen the window or reorder the items |
| No item is highlighted after opening a record | The record's object is not on the current app's bar | Switch to an app that includes the object |
| A web tab shows a blank frame | The external site refuses to load inside another page | Check the site's framing rules, or open it in a new window |
| Two users see different items in the same app | Different profiles, permission sets, or personalization | Compare their assignments |
Summary
The navigation bar displays the current app's items. Most items are object tabs that lead to object home pages. Items you cannot fit appear in More, and items you lack access to do not appear at all. The App Launcher's All Items view helps you decide whether a missing item is an app issue or an access issue.
Exercise
A user opens the Opportunities item from the navigation bar in the Sales app and sees it. A colleague in the same app cannot see any Opportunities item, not even in the More menu. Name two things you would check, and say how you would tell whether the problem is the app or the colleague's access.
Show answer
Check the colleague's profile and permission sets for the Opportunities tab setting (Tab Hidden removes the item) and for read access to the Opportunity object. To separate the two causes, have the colleague open the App Launcher and look in All Items. If Opportunities is listed there, the object is accessible and the current app does not show it to them, so the app assignment or item list is the issue. If it is missing there too, the cause is the colleague's tab visibility or object permissions.
Exercise
You open an Account record from a global search result while working in an app that has no Accounts item. Which item is highlighted on the navigation bar, and why?
Show answer
None is highlighted. The bar highlights only items that match the current page's object, and this app has no Accounts item. The record still opens normally, because search can reach objects outside the current app.