Closes a workspace tab or subtab.
This method works only in
Lightning console apps.
Arguments
| tabId |
string |
ID of the workspace tab or subtab to close. |
Sample Code
This component has a button that, when pressed, closes the currently focused tab.
Component code:
Controller code:
Response
This method returns a promise that, upon success, resolves to a
tabInfo object representing the closed tab.
A tabInfo object is a JSON array of
information about a workspace tab, with nested arrays of information on each subtab. This is
the structure of a tabInfo
object.