Newer Version Available
Console API Method Parity—What’s Different Between Lightning Experience and Salesforce Classic?
This table shows which Salesforce Console Integration Toolkit (Salesforce Classic) methods map to Lightning Console JavaScript API (Lightning Experience) methods and events. Not every Salesforce Console Integration Toolkit has a Lightning analog. You can replicate some Classic methods using Lightning events, combining Lightning Experience methods, or using iterative and conditional logic with methods and events.
Methods for Primary Tabs and Subtabs
| Salesforce Console Integration Toolkit (Salesforce Classic) | Lightning Console JavaScript API Method (Lightning Experience) |
|---|---|
| closeTab() | closeTab() |
| focusPrimaryTabById() | focusTab() |
| focusSubtabById() | focusTab() |
| getEnclosingPrimaryTabId() |
Use the Lightning method getEnclosingTabId(). If the calling component is within a subtab, then the subtab ID is returned. If the calling component is within a workspace tab, then the workspace ID is returned. |
| getEnclosingPrimaryTabObjectId() | Use getEnclosingTabId() to get the tab ID. Then, use the tab ID to call getTabInfo(tabId), which includes the object ID in the response payload (if applicable). |
| getEnclosingTabId() |
Use the Lightning method getEnclosingTabId(). If the calling component is within a subtab, then the subtab ID is returned. If the calling component is within a workspace tab, then the workspace ID is returned. |
| getFocusedPrimaryTabId() | getFocusedTabInfo() |
| getFocusedPrimaryTabObjectId() | getFocusedTabInfo() |
| getFocusedSubtabId() | getFocusedTabInfo() |
| getPageInfo() | getTabInfo() |
| getPrimaryTabIds() | Not supported. Workaround: Call getAllTabInfo(). |
| getSubtabIds() | Not supported. Workaround: Call getAllTabInfo() to get a list of all workspace tab objects. Iterate through each workspace tab object, collecting subtab IDs where applicable |
| getTabLink() | getTabURL() |
| onEnclosingTabRefresh() | Use lightning:tabRefreshed with getEnclosingTabId(). |
| onFocusedPrimaryTab() | lightning:tabFocused |
| onFocusedSubtab() | lightning:tabFocused |
| onTabSave() | Not supported. |
| openConsoleUrl() | openConsoleUrl() |
| openPrimaryTab() | openTab() |
| openSubtab() | openSubtab() |
| refreshPrimaryTabById() | Use refreshTab() and specify a workspace tab ID. The activate argument isn’t supported in the Lightning API. Use refreshTab() with focusTab(). instead. |
| refreshSubtabById() | Use refreshTab() and specify a subtab ID. The activate argument isn’t supported in the Lightning API. Use refreshTab() with focusTab(). instead. |
| setTabIcon() | setTabIcon() |
| setTabTitle() | setTabLabel() |
| setTabUnsavedChanges() | Use the lightning:unsavedChanges component. |
Methods for Navigation Tabs
The force:navigateToObjectHome Lightning event allows you to complete actions for many navigation tab methods in Salesforce Classic.
| Salesforce Console Integration Toolkit (Salesforce Classic) | Lightning Console JavaScript API Method (Lightning Experience) |
|---|---|
| focusNavigationTab() | focusNavigationItem() |
| getNavigationTabs() | getNavigationItems() |
| getSelectedNavigationTab() | getSelectedNavigationItem() |
| refreshNavigationTab() | refreshNavigationItem() |
| setSelectedNavigationTab() | force:navigateToObjectHome |
Methods for Application-Level Custom Console Components
| Salesforce Console Integration Toolkit (Salesforce Classic) | Lightning Console JavaScript API Method (Lightning Experience) |
|---|---|
| blinkCustomConsoleComponentButtonText() | Not supported. Workaround: Use setUtilityLabel. |
| isCustomConsoleComponentWindowHidden() | getUtilityInfo() |
| onCustomConsoleComponentButtonClicked() | onUtilityClick() |
| setCustomConsoleComponentButtonIconUrl() | |
| setCustomConsoleComponentButtonStyle() | setUtilityHighlighted |
| setCustomConsoleComponentButtonText() | setUtilityLabel |
| setCustomConsoleComponentHeight() | setPanelHeight() |
| setCustomConsoleComponentVisible() | |
| setCustomConsoleComponentWidth() | setPanelWidth() |
Methods for Live Agent
| Salesforce Console Integration Toolkit (Salesforce Classic) | Lightning Console JavaScript API Method (Lightning Experience) |
|---|---|
| endChat() | endChat() |
| getChatLog() | getChatLog() |
| sendCustomEvent() | sendCustomEvent() |
| sendMessage() | sendMessage() |
Methods for Omni-Channel
| Salesforce Console Integration Toolkit (Salesforce Classic) | Lightning Console JavaScript API Method (Lightning Experience) |
|---|---|
| acceptAgentWork() | acceptAgentWork() |
| closeAgentWork() | closeAgentWork() |
| declineAgentWork() | declineAgentWork() |
| getAgentWorkload() | getAgentWorkload() |
| getAgentWorks() | getAgentWorks() |
| getServicePresenceStatusChannels() | getServicePresenceStatusChannels() |
| getServicePresenceStatusId() | getServicePresenceStatusId |
| login() | login() |
| logout() | logout() |
| sertServicePresenceStatus() | setServicePresenceStatus() |
Methods for Computer-Telephony Integration (CTI)
| Salesforce Console Integration Toolkit (Salesforce Classic) | Lightning Console JavaScript API Method (Lightning Experience) |
|---|---|
| onCallBegin() | Not supported. |
| onCallEnd() | Not supported. |
| onCallLogSaved() | Not supported. |