Newer Version Available

This content describes an older version of this product. View Latest

Console API Method Parity—What’s Different Between Lightning Experience and Salesforce Classic?

The Lightning Console JavaScript API provides methods similar to those methods in the Salesforce Console Integration Toolkit.

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. Some Salesforce Console Integration Toolkit methods can be replicated by using Lightning events, combining methods from the Lightning Console JavaScript API, or using iterative and conditional logic with methods and events.

Only Salesforce Console Integration Toolkit methods with a Lightning Console JavaScript API or workaround appear in this table. Methods without alternatives or workarounds are not listed.

Important

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() Not supported.

Workaround: Call getTabInfo() on the tab in question. If response.isSubtab is true, store response.parentTabId. Call getTabInfo() using the parentTabId.

getEnclosingPrimaryTabObjectId() Not supported.

Workaround: Call getTabInfo() on the tab in question. If response.isSubtab is true, store response.parentTabId. Call getTabInfo() using the parentTabId.

getEnclosingTabId() Not supported.

Workaround: Call getTabInfo() on the tab in question. If response.isSubtab is true, store response.parentTabId. Call getTabInfo() using the parentTabId.

getFocusedPrimaryTabId() getFocusedTabInfo()
getFocusedPrimaryTabObjectId() getFocusedTabInfo()
getFocusedSubtabId() getFocuseTabInfo()
getPageInfo() getTabInfo()
getPrimaryTabIds() Not supported.

Workaround: Call getAllTabInfo(), iterate through the response, and save tabIds for which isSubtab is false.

getSubtabIds() Not supported.

Workaround: Call getAllTabInfo(), iterate through the response, and save tabIds for which isSubtab is true.

getTabLink() getTabURL()
onEnclosingTabRefresh() force:tabRefreshed
onFocusedSubtab() force:tabFocused
onTabSave() force:tabUpdated
openConsoleUrl() openTab()
openPrimaryTab() openTab()
openSubtab() openSubtab()
refreshPrimaryTabById() Not supported.

Workaround: Call getFocusedTabInfo() to get the current focused tab’s tabId. Then use force:refreshview to focus the tab you want to refresh, and call focusTab() with the tabId you got.

setTabIcon() setTabIcon()
setTabTitle() setTabLabel()

Methods for Navigation Tabs

The force:navigateToObjectHome Lightning event allows you to complete actions analogous to many navigation tab methods in Salesforce Classic.

Salesforce Console Integration Toolkit (Salesforce Classic) Lightning Console JavaScript API Method (Lightning Experience)
focusNavigationTab() force:navigateToObjectHome
refreshNavigationTab() force:navigateToObjectHome
setSelectedNavigationTab() force:navigateToObjectHome