Note: This release is in preview. Features described here don’t become generally available until the latest general availability date that Salesforce announces for this release. Before then, and where features are noted as beta, pilot, or developer preview, we can’t guarantee general availability within any particular time frame or at all. Make your purchase decisions only on the basis of generally available products and features.
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/v67.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":"https://salesforce.com/some/path/index.html",
26 "subLocation":"S1MobileCardFullview",
27 "uiTheme":"Theme3",
28 "version":
29 {
30 "api":"67.0",
31 "season":"SUMMER"
32 }
33}