Control Navigation Items in Lightning Console Apps

The lightning/platformNavigationItemApi module provides methods to manage navigation items in the item menu of a Lightning console app.

Where: This change applies to Lightning console apps in Enterprise, Performance, Unlimited, and Developer editions.

Why: The Navigation Item API methods provide a modern alternative to the lightning:navigationItemAPI Aura component.

How: Import the lightning/platformNavigationItemApi module to access the methods.

These API methods for LWC are available for Lightning console apps. All methods return promises.

  • focusNavigationItem() — Focuses on the selected navigation object and opens the object's home page, which is usually the object's list view.
  • getNavigationItems() — Returns information about all navigation items available in the item menu.
  • getSelectedNavigationItem() — Returns information about the currently selected navigation item.
  • setSelectedNavigationItem(developerName) — Selects a navigation item by its developer name (API name), such as 'standard-Account'.
  • refreshNavigationItem() — Refreshes the home page or split view of the currently selected navigation object.