getAppViewInfo() for Lightning Experience
Returns information about the current application view. This method is available in API version 38.0 or later.
| Name | Type | Description |
|---|---|---|
callback | function | JavaScript method executed when the API method call is completed. |
This method is asynchronous. The response is returned in an object passed to a callback method.
When you switch from a record detail page to a list view, this method returns:
-
In Lightning Experience, only the
url -
In Lightning Experience console apps, nothing is returned because the listener isn’t invoked
-
success(boolean)-
: Returns
trueif the API method call was invoked successfully,falseotherwise.
-
-
returnValue(object)-
: Returns the URL of the current application view and includes any applicable record ID, record name, and object type. For example:
Invoking this API method on a person account object returns the following additional information.
accountIdorcontactId—The associated account or contact ID.personAccount—Which istrueif person accounts are enabled in your org,falseotherwise.
For example:
Since the URL structure of the
returnValuecan change in the future, we recommend that you don’t build any logic based on it.
-
-
error(array)- : If the API call was successful, this variable is
null. If the API call failed, this variable returns an array of error messages.
- : If the API call was successful, this variable is