Skip to content

Instantly share code, notes, and snippets.

@prafulgadgetrek
Last active March 31, 2017 06:57
Show Gist options
  • Save prafulgadgetrek/e1f2d42696f2aa48e2162166b86654e8 to your computer and use it in GitHub Desktop.
Save prafulgadgetrek/e1f2d42696f2aa48e2162166b86654e8 to your computer and use it in GitHub Desktop.
<aura:component implements="flexipage:availableForRecordHome,force:lightningQuickActionWithoutHeader,force:hasRecordId">
<aura:attribute name="opp" type="Opportunity"/>
<!-- Set values for opp attribute using recordPreview -->
<force:recordPreview
aura:id="recordLoader"
recordId="{!v.recordId}"
fields="[Name,StageName,Amount]"
targetRecord="{!v.opp}"
/>
<!-- Preview current Opportunity record -->
<div class="slds-page-header" role="banner">
<p class="slds-text-heading--label">{!v.opp.Name}</p>
<h1 class="slds-page-header__title slds-m-right--small slds-truncate slds-align-left">
{!v.opp.StageName}, {!v.opp.Amount}
</h1>
</div>
</aura:component>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment