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.
Context
- Application—Information about the canvas app, such as version, access method, URL, and so on.
- Environment—Information about the environment, such as location, UI theme, and so on.
- Links—Links, such as the metadata URL, user URL, Chatter groups URL, and so on. You can use these links to make calls into Salesforce from your app.
- Organization—Information about the organization, such as name, ID, currency code, and so on.
- User—Information about the currently logged-in user, such as locale, name, user ID, email, and so on.
1"context":{
2 "application":
3 {
4 "applicationId":"06Px000000003ed",
5 "authType":"SIGNED_REQUEST",
6 "canvasUrl":"http://MyDomainName.my.salesforce.com:8080
7 /canvas_app_path/canvas_app.jsp",
8 "developerName":"my_java_app",
9 "isInstalledPersonalApp": false,
10 "name":"My Java App",
11 "namespace":"org_namespace",
12 "options":[],
13 "referenceId":"09HD00000000AUM",
14 "samlInitiationMethod": "None",
15 "version":"1.0.0"
16 },
17 "user":
18 {
19 "accessibilityModeEnabled":false,
20 "currencyISOCode":"USD",
21 "email":"admin@6457617734813492.com",
22 "firstName":"Sean",
23 "fullName":"Sean Forbes",
24 "isDefaultNetwork":false,
25 "language":"en_US",
26 "lastName":"Forbes",
27 "locale":"en_US",
28 "networkId":"0DBxx000000001r",
29 "profileId":"00ex0000000jzpt",
30 "profilePhotoUrl":"/profilephoto/005/F",
31 "profileThumbnailUrl":"/profilephoto/005/T",
32 "roleId":null,
33 "siteUrl":"https://MyDomainName.my.site.com/",
34 "siteUrlPrefix":"/mySite",
35 "timeZone":"America/Los_Angeles",
36 "userId":"005x0000001SyyEAAS",
37 "userName":"admin@6457617734813492.com",
38 "userType":"STANDARD"
39 },
40 "environment":
41 {
42 "parameters":{},
43 "dimensions":
44 {
45 "clientHeight": "50px",
46 "clientWidth": "70px",
47 "height":"900px",
48 "width":"800px",
49 "maxHeight":"2000px",
50 "maxWidth":"1000px"
51
52 },
53 "record":
54 {
55 "attributes":
56 {
57 "type":"Account",
58 "url":"/services/data/v67.0/sobjects/Account/001xx000003DGWiAAO"
59 },
60 "Id":"001xx000003DGWiAAO",
61 "Phone":"(555) 555-5555",
62 "Fax":"(555) 555-5555",
63 "BillingCity":"Seattle"
64 },
65 "displayLocation":"Chatter",
66 "locationUrl":"http://MyDomainName.my.salesforce.com:8080/canvas_app_path",
67 "subLocation":null,
68 "uiTheme":"Theme3",
69 "version":
70 {
71 "api":"67.0",
72 "season":"SUMMER"
73 }
74 },
75 "organization":
76 {
77 "currencyIsoCode":"USD",
78 "multicurrencyEnabled":true,
79 "name":"Edge Communications",
80 "namespacePrefix":"org_namespace",
81 "organizationId":"00Dx00000001hxyEAA"
82 },
83 "links":
84 {
85 "chatterFeedItemsUrl":"/services/data/v67.0/chatter/feed-items",
86 "chatterFeedsUrl":"/services/data/v67.0/chatter/feeds",
87 "chatterGroupsUrl":"/services/data/v67.0/chatter/groups",
88 "chatterUsersUrl":"/services/data/v67.0/chatter/users",
89 "enterpriseUrl":"/services/Soap/c/67.0/00Dx00000001hxy",
90 "loginUrl":"http://MyDomainName.my.salesforce.com",
91 "metadataUrl":"/services/Soap/m/67.0/00Dx00000001hxy",
92 "partnerUrl":"/services/Soap/u/67.0/00Dx00000001hxy",
93 "queryUrl":"/services/data/v67.0/query/",
94 "restUrl":"/services/data/v67.0/",
95 "recentItemsUrl":"/services/data/v67.0/recent/",
96 "searchUrl":"/services/data/v67.0/search/",
97 "sobjectUrl":"/services/data/v67.0/sobjects/",
98 "userUrl":"/005x0000001SyyEAAS"
99 }
100}You can request Salesforce exclude portions of the context data that you don’t need. To control the amount of data that’s excluded, you must implement your own Canvas.CanvasLifecycleHandler in Apex and provide a list of excluded context sections in your implementation of excludeContextTypes().