Newer Version Available

This content describes an older version of this product. View Latest

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.

Syntax

Arguments

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.

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
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 example:
For API version 31.0 and later, invoking this API method on a PersonAccount object returns the following additional information.
  • accountId or contactId, the associated account or contact ID
  • personAccount, which is true if the object is a PersonAccount and false otherwise
For example:
callback function JavaScript method that’s called upon completion of the method.