getPageInfo() for Salesforce Classic
Returns information about the current page.
| Name | Type | Description |
|---|---|---|
callback | function | JavaScript method executed when the API method call is completed. |
| Name | Type | Description |
|---|---|---|
result | string | Returns the URL of the current page as a JSON string, including 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 method on a PersonAccount object also returns accountId or contactId, and personAccount (true if the object is a PersonAccount, false otherwise). |
error | string | If the API call was successful, this variable is undefined. If the API call failed, this variable returns an error message. |
Example result:
Example result for a PersonAccount object (API version 31.0 and later):