Console API Method Parity
Salesforce Classic Methods Supported in Lightning Experience
Utility Bar API Method Parity
Previous Versions
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 allowlisted with CSP directives via Trusted URLs. 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.
Only API versions 42.0 and above of the Salesforce Console Integration Toolkit are supported in the Lightning Console JavaScript API. Only API versions 43.0 and above are supported in Open CTI.
Important
Methods using objectId return 18-character, case-insensitive record IDs when invoked from within a Lightning console. When invoked from within a Salesforce Classic console, they return 15-character, case-sensitive record IDs.
Workspace tab and subtab IDs in a Lightning console use a different format from Salesforce Classic console primary tab and subtab IDs. Any code that validates the format of tab IDs must be updated or removed to account for the change. A Salesforce Classic console tab ID can look like scc-pt-1 or scc-st-1. A Lightning console tab ID looks like ctab1 or ctab1_3.
Note
| 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 | 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 | 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() | ![]() | ![]() |
LWC doesn’t currently support working with these methods.
Note
The following methods must be called from within a Lightning utility.
LWC doesn’t currently support working with these methods.
Note
| Salesforce Classic Method | Supported in Lightning Console | Notes About Use in Lightning Console |
|---|---|---|
focusNavigationTab() | ![]() | |
getNavigationTabs() | ![]() | |
getSelectedNavigationTab() | ![]() | |
refreshNavigationTab() | ![]() | |
setSelectedNavigationTab() | ![]() |
LWC doesn’t currently support working with these methods.
Note
LWC doesn’t currently support working with these methods.
Note
| Salesforce Classic Method | Supported in Lightning Console | Notes About Use in Lightning Console |
|---|---|---|
acceptAgentWork() | ![]() | |
closeAgentWork() | ![]() | |
declineAgentWork() | ![]() | |
getAgentWorkload() | ![]() | |
getAgentWorks() | ![]() | |
getServicePresenceStatusChannels() | ![]() | |
getServicePresenceStatusId() | ![]() | |
login() | ![]() | |
logout() | ![]() | |
setServicePresenceStatus() | ![]() |
LWC doesn’t currently support working with these methods.
Note
| 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() | ![]() |