Newer Version Available
closeTab() for Lightning Experience
Arguments
| Name | Type | Description |
|---|---|---|
| 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 true.