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. 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.
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 |
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() | getUtilityState() |
| onFocusedPrimaryTab() | force:tabFocused |
| setCustomConsoleComponentButtonIconUrl() | setPanelHeaderIcon() |
| setCustomConsoleComponentButtonStyle() | setUtilityHighlighted |
| setCustomConsoleComponentButtonText() | setUtilityLabel |
| setCustomConsoleComponentHeight() | setPanelHeight() |
| setCustomConsoleComponentVisible() | minimizeUtility() |
| setCustomConsoleComponentWidth() | setPanelWidth() |
| setCustomConsoleComponentWindowVisible() | openUtility() |