July 2018
Beginner to intermediate
458 pages
9h 58m
English
The Lightning output field component allows us to display the record view using the provided fields. You will need to enclose Lightning:outputfield in a wrapper component: Lightning:recordViewForm. The mandatory attributes for the recordViewForm are the recordId and the objectAPIName.
The syntax for the record view form is as follows:
<aura:component implements="force:hasRecordId,flexipage:availableForRecordHome"> <Lightning:recordViewForm recordId="{!v.recordId}" objectApiName="Contact"> <div class="slds-grid"> <div class="slds-col slds-size_1-of-2"> <!-- Your Lightning:outputField components here --> </div> <div class="slds-col slds-size_1-of-2"> <!-- More Lightning:outputField components here ...