force:recordView

Generates a view of the specified Salesforce record.

A force:recordView component represents a read-only view of a record. You can display the record view using different layout types. By default, the record view uses the full layout to display all fields of the record. The mini layout displays the name field and any associated parent record field. This example shows a record view with a mini layout.

<force:recordView recordId="a02D0000006V8Ov" type="MINI"/>

You can provide a dynamic ID for the recordId attribute using the format {!v.myObject.recordId}. Make sure you have wired up the container component to an Apex controller that returns the object data using the @AuraEnabled syntax.

Attributes

Attribute Name Attribute Type Description Required?
body Component[] The body of the component. In markup, this is everything in the body of the tag.
record SObjectRow The record (SObject) to load, optional if recordId attribute is specified.
recordId String The Id of the record to load, optional if record attribute is specified.
type String The type of layout to use to display the record. Possible values: FULL, MINI. The default is FULL.