generateConsoleUrl() for Lightning Experience
Generates a URL for a workspace tab and its subtabs. This method works only in Lightning console apps. This method isn’t supported for Lightning Web Components (LWC).
| Name | Type | Description |
|---|---|---|
pageReferences | pageReference[] | An array of page references. The first page reference is the workspace tab. Any following page references are subtabs. The last page reference is the focused subtab. |
This component has a button that, when pressed, uses the generateConsoleUrl() method to create a URL for the provided page references.
Component code:
Controller code:
This method returns a promise that, upon success, resolves with the generated URL.
| Name | Type | Description |
|---|---|---|
url | string | A console URL that represents the array of URLs passed into Salesforce. |