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.

Record

The Record object is a JSON-formatted object that contains information about the object on which the canvas app appears. This could be a standard object like Account or a custom object like 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.

This object contains the Attributes object.

Field Description
Id The ID of the related object. For example, if the canvas app appears on an Account page, this field contains the AccountId.

If the canvas app appears on a Visualforce page through use of the <apex:canvasApp> component, and that Visualforce page is associated with an object (placed on the page layout, for example), you can use the entityFields attribute on the component to return specific fields or all fields from the related object.

The following code snippet shows an example of the Record object returned from a canvas app that appears on an Account page. In this example, the Phone, Fax, and BillingCity fields were specified in the entityFields attribute.