Newer Version Available
setSelectedNavigationItem() for Lightning Experience
Sets the selected navigation item to a specific ID. This method works only in
Lightning console apps.
Arguments
| Name | Type | Description |
|---|---|---|
| developerName | string | The ID of the navigation item. |
Sample Code
This Aura component has a button that, when pressed, sets the specified ID as the selected navigation item.
Component code:
Controller code:
Response
This method returns a promise that, upon success, resolves to true.