Newer Version Available
Environment
The Environment object is a JSON-formatted object containing context information about the canvas app environment. This object contains the Dimensions object, the Record object, the Version object, and parameters (if there are any) in the Parameters object.
The following code snippet shows an example of the Environment object.
1"environment":
2{
3 "parameters":{},
4 "dimensions":
5 {
6 "clientHeight": "50px",
7 "clientWidth": "70px",
8 "height":"900px",
9 "width":"800px",
10 "maxHeight":"2000px",
11 "maxWidth":"1000px"
12
13 },
14 "record": {
15 "attributes": {
16 "type": "Account",
17 "url": "/services/data/v52.0/sobjects/Account/001xx000003DGWiAAO"
18 },
19 "Id": "001xx000003DGWiAAO",
20 "Phone": "(555) 555-5555",
21 "Fax": "(555) 555-5555",
22 "BillingCity": "Seattle"
23 },
24 "displayLocation":"PageLayout",
25 "locationUrl":"http://www.salesforce.com/some/path/index.html",
26 "subLocation":"S1MobileCardFullview",
27 "uiTheme":"Theme3",
28 "version":
29 {
30 "api":"52.0",
31 "season":"SUMMER"
32 }
33}