Sunday, May 26, 2019

Lightning:recordViewForm

Lightning:recordViewForm use lightning:outputField and is used to display
information related to that record.The field-level security and sharing are taken into consideration by this component so user will only see
the data they have access to.

Note:

1)Not all standard object are supported.
For ex: Event and task.

To display the fields on a record, use lightning:outputField.

Navicomp.cmp

<aura:component implements="flexipage:availableForRecordHome,force:hasRecordId" access="global" >
    <lightning:recordViewForm  objectApiName="Account" recordId="{!v.recordId}">
        <div class="slds-grid">
            <div class="slds-col slds-size_1-of-2">
                <lightning:outputField fieldName="Name" />
            </div>
            <div class="slds-col slds-size_1-of-2">
                <lightning:outputField fieldName="Industry"/>
            </div>
         
        </div>
     
    </lightning:recordViewForm>
</aura:component>

Lightning:recordViewForm

No comments:

Post a Comment