Newer Version Available
getTabLink()
Retrieves the URL to a tab, or group of related tabs, from
the Salesforce console. This method is only available in API version 28.0 or
later.
Syntax
Arguments
| Name | Type | Description |
|---|---|---|
| level | string | Level that matches one of the Link to Share options in the Salesforce console user
interface. The options are:
For more information, see “Tabs and Navigation in the Salesforce Classic Console” in the online help. |
| tabId | string | Optional tab ID of the tab from which you’re retrieving the URL. If you do not pass a tab ID, the URL to the current tab is returned. |
| callback | function | JavaScript method that’s called upon completion of the method. |
Sample Code–Visualforce
Response
This method is asynchronous so it returns its response in an object in a callback method. The response object contains the following fields:
| Name | Type | Description |
|---|---|---|
| tabLink | string | The retrieved URL. |
| success | boolean | true if the link was retrieved successfully, false if retrieving was unsuccessful. |
| callback | function | JavaScript method that’s called upon completion of the method. |