Newer Version Available
Classic Console API Methods Supported in the Lightning Console API
Salesforce Console Integration Toolkit methods that aren’t supported in Lightning Experience result in a failure error message.
Methods for Primary Tabs and Subtabs
| Salesforce Classic Method | Supported in Lightning Console (Aura) | Supported in Lightning Console (LWC) | Notes About Use in Lightning Console |
|---|---|---|---|
| closeTab() | ![]() |
![]() |
|
| disableTabClose() | ![]() |
![]() |
|
| focusPrimaryTabById() | ![]() |
![]() |
|
| focusPrimaryTabByName() | ![]() |
![]() |
|
| focusSidebarComponent() | ![]() |
![]() |
|
| focusSubtabById() | ![]() |
![]() |
|
| focusSubtabByNameAndPrimaryTabId() | ![]() |
![]() |
|
| focusSubtabByNameAndPrimaryTabName() | ![]() |
![]() |
|
| generateConsoleUrl() | ![]() |
![]() |
|
| getEnclosingPrimaryTabId() | ![]() |
![]() |
|
| getEnclosingTabId() | ![]() |
![]() |
|
| getFocusedPrimaryTabId() | ![]() |
![]() |
|
| getFocusedPrimaryTabObjectId() | ![]() |
![]() |
|
| getFocusedSubtabId() | ![]() |
![]() |
|
| getFocusedSubtabObjectId() | ![]() |
![]() |
|
| getPageInfo() | See notes | ![]() |
These fields aren’t supported and aren’t returned in the response:
|
| getPrimaryTabIds() | ![]() |
![]() |
|
| getSubtabIds() | ![]() |
![]() |
|
| getTabLink() | See notes | ![]() |
The level argument sforce.console.TabLink.PARENT_AND_CHILDREN isn’t supported. |
| isInConsole() | ![]() |
![]() |
|
| onEnclosingTabRefresh() | ![]() |
![]() |
|
| onFocusedPrimaryTab() | ![]() |
![]() |
|
| onFocusedSubtab() | ![]() |
![]() |
Utility items aren’t supported in the Lightning API. |
| onTabSave() | ![]() |
![]() |
|
| openConsoleUrl() | ![]() |
![]() |
|
| openPrimaryTab() | See notes |
Make sure to add third-party domains to the Trusted URLs list. The following aren’t supported in the Lightning API:
|
|
| openSubtab() | See notes |
Make sure to add third-party domains to the Trusted URLs list. The following aren’t supported in the Lightning API:
|
|
| openSubtabByPrimaryTabName() | ![]() |
![]() |
|
| refreshPrimaryTabById() | See notes | See notes | The fullRefresh argument isn’t supported in the Lightning API. |
| refreshPrimaryTabByName() | ![]() |
![]() |
|
| refreshSubtabById() | See notes | See notes | The fullRefresh argument isn’t supported in the Lightning API. |
| refreshSubtabByNameAndPrimaryTabId() | ![]() |
![]() |
|
| refreshSubtabByNameAndPrimaryTabName() | ![]() |
![]() |
|
| reopenLastClosedTab() | ![]() |
![]() |
|
| resetSessionTimeOut() | ![]() |
![]() |
|
| setTabUnsavedChanges() | ![]() |
![]() |
|
| setTabIcon() | See notes | See notes | Only Salesforce Lightning Design System icons are
supported for iconUrl. URLs and custom
icons aren’t supported. Sample supported values:
|
| setTabLink() | ![]() |
![]() |
|
| setTabStyle() | ![]() |
![]() |
|
| setTabTextStyle() | ![]() |
![]() |
|
| setTabTitle() | ![]() |
![]() |
Methods for Application-Level Custom Console Components
The following methods must be called from within a Lightning utility.
Methods for Navigation Tabs
| Salesforce Classic Method | Supported in Lightning Console | Notes About Use in Lightning Console |
|---|---|---|
| focusNavigationTab() | ![]() |
|
| getNavigationTabs() | ![]() |
|
| getSelectedNavigationTab() | ![]() |
|
| refreshNavigationTab() | ![]() |
|
| setSelectedNavigationTab() | ![]() |
Methods for Live Agent
Methods for Omni-Channel
| Salesforce Classic Method | Supported in Lightning Console | Notes About Use in Lightning Console |
|---|---|---|
| acceptAgentWork() | ![]() |
|
| closeAgentWork() | ![]() |
|
| declineAgentWork() | ![]() |
|
| getAgentWorkload() | ![]() |
|
| getAgentWorks() | ![]() |
|
| getServicePresenceStatusChannels() | ![]() |
|
| getServicePresenceStatusId() | ![]() |
|
| login() | ![]() |
|
| logout() | ![]() |
|
| setServicePresenceStatus() | ![]() |
Methods for Console Events
| Salesforce Classic Method | Supported in Lightning Console | Notes About Use in Lightning Console |
|---|---|---|
| addEventListener() | ![]() |
sforce.console.ConsoleEvent.CONSOLE_LOGOUT isn’t supported in the
Lightning API. sforce.console.ConsoleEvent.CLOSE_TAB returns the ID of the closed tab only. The Lightning API doesn’t return the objectId or the tabObjectId. The Lightning API doesn’t return special message responses from custom keyboard shortcuts. However, if the response is from a console event, the message includes payload details. |
| fireEvent() | See notes | fireEvent() returns success true even when eventListeners for the given eventType are removed. |
| removeEventListener() | ![]() |

