Newer Version Available
getTabURL() for Lightning Experience
Returns the URL of the specified tab. This method works only in
Lightning console apps.
Arguments
| Name | Type | Description |
|---|---|---|
| tabId | string | ID of the tab for which to retrieve the URL. |
Sample Code
This component has a button that, when pressed, opens a tab and uses the getTabURL() method to print the new tab’s URL to the developer console.
Component code:
Controller code:
Response
This method returns a promise that, upon success, resolves to the
URL of the specified tab.