Created
November 13, 2018 11:06
-
-
Save simpluslabs/de5359f4846f7bf42e1bf2d131aecd5c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!--forceRecordDataComp--> | |
<aura:component> | |
<aura:attribute name="recordId" type="String" default="0017F00000RxUwTQAV"/> | |
<aura:attribute name="record" type="Object"/> | |
<aura:attribute name="simpleRecord" type="Object"/> | |
<aura:attribute name="recordError" type="String"/> | |
<force:recordData aura:id="recordLoader" | |
recordId="{!v.recordId}" | |
targetFields="{!v.simpleRecord}" | |
targetError="{!v.recordError}" | |
recordUpdated="{!c.handleRecordUpdated}" | |
fields="BillingCity,BillingState,Name" | |
/> | |
<lightning:card iconName="standard:account" title="{!v.simpleRecord.Name}" > | |
<p> | |
<lightning:formattedText title="Billing City" value="{!v.simpleRecord.Name}" /></p> | |
<p> | |
<lightning:formattedText title="Billing City" value="{!v.simpleRecord.BillingCity}" /></p> | |
<p> | |
<lightning:formattedText title="Billing State" value="{!v.simpleRecord.BillingState}" /></p> | |
</lightning:card> | |
<!-- Display Lightning Data Service errors, if any --> | |
<aura:if isTrue="{!not(empty(v.recordError))}"> | |
<div class="recordError"> | |
{!v.recordError}</div> | |
</aura:if> | |
</aura:component> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment