May 27, 2020

How to pass record Id in Flow to Lightning Component in Salesforce?

Aura Component Code:

<aura:component implements="lightning:availableForFlowScreens">
   
    <aura:attribute name="RecordId" type="String"/>
   
    <lightning:recordViewForm recordId="{! v.RecordId }" objectApiName="Account">
        <div class="slds-box">
            <lightning:outputField fieldName="Name" />
            <lightning:outputField fieldName="Industry" />
        </div>
    </lightning:recordViewForm>
   
</aura:component>


Flow:


Input Variable for capturing record id:


Pass RecordId which is the Input Variable:


Output:



No comments:

Post a Comment