Newer Version Available
Classic Console API Methods Supported in the Lightning Console API
Visualforce pages and third-party web tabs that use some Salesforce Console Integration
Toolkit methods work in Lightning Experience as-is. Just point to the latest version of the
toolkit script in your Visualforce pages or third-party web tabs. Third-party content must be
whitelisted in the CSP Trusted Sites. This table lists the Salesforce Console Integration
Toolkit methods that you can use in Lightning Console JavaScript API starting with API version
42.0.
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 | 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() | ![]() |
|
| onTabSave() | ![]() |
|
| openConsoleUrl() | ![]() |
|
| openPrimaryTab() | See notes |
The following aren’t supported in the Lightning API:
|
| openSubtab() | See notes |
The following aren’t supported in the Lightning API:
|
| openSubtabByPrimaryTabName() | ![]() |
|
| refreshPrimaryTabById() | See notes | The fullRefresh argument isn’t supported in the Lightning API. |
| refreshPrimaryTabByName() | ![]() |
|
| refreshSubtabById() | See notes | The fullRefresh argument isn’t supported in the Lightning API. |
| refreshSubtabByNameAndPrimaryTabId() | ![]() |
|
| refreshSubtabByNameAndPrimaryTabName() | ![]() |
|
| reopenLastClosedTab() | ![]() |
|
| resetSessionTimeOut() | ![]() |
|
| setTabUnsavedChanges() | ![]() |
|
| setTabIcon() | 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() | ![]() |

