getPageInfo()
Returns page information for the specified tab after its content has loaded. If the tab ID is null, it returns page information for the enclosing primary tab or subtab. Note that to get the page information from a custom console component, a tabId must be passed as the first parameter to this method.This method is only available in API version 26.0 or later.
| Name | Type | Description |
|---|---|---|
tabId | string | ID of the tab from which page information is returned. |
callback | function | JavaScript method that’s called upon completion of the method. |
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 |
|---|---|---|
pageInfo | string | Returns the URL of the current page as a JSON string, and includes any applicable object ID, object name, object type, and for API version 33.0 or later, the object tab name. For API version 31.0 and later, invoking this API method on a PersonAccount object returns the following additional information.
|
callback | function | JavaScript method that’s called upon completion of the method. |
For example, a response for a current page:
Where MY_DOMAIN_NAME is a variable.
For example, a response for a PersonAccount:
Where MY_DOMAIN_NAME is a variable.