Record
The Record object is a JSON-formatted object that contains information about the object on which the canvas app appears.Account などの標準オブジェクトの場合、または Warehouse__c などのカスタムオブジェクトの場合があります。If the canvas app doesn’t appear on an object page or in the publisher or feed associated with an object, then the Record object is empty.
このオブジェクトには、Attributes オブジェクトが含まれます。
| 項目 | 説明 |
|---|---|
| Id | 関連オブジェクトの ID。たとえば、[取引先] ページにキャンバスアプリケーションが表示される場合、この項目に AccountId が含まれています。 |
キャンバスアプリケーションが <apex:canvasApp> コンポーネントを使用して Visualforce ページに表示され、その Visualforce ページがオブジェクトに関連付けられている場合 (たとえば、ページレイアウトへ配置されているなど)、コンポーネントの entityFields 属性を使用して関連するオブジェクトから特定の項目またはすべての項目を返すことができます。
The following code snippet shows an example of the Record object returned from a canvas app that appears on an Account page.この例では、entityFields 属性で Phone、Fax、および BillingCity 項目が指定されています。
1"record":{
2 "attributes":{
3 "type":"Account",
4 "url":"/services/data/v50.0/sobjects/Account/001xx000003DGWiAAO"
5 },
6 "Id":"001xx000003DGWiAAO",
7 "Phone":"(555) 555-5555",
8 "Fax":"(555) 555-5555",
9 "BillingCity":"Seattle"
10 }