Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <aura:component implements="forceCommunity:availableForAllPageTypes,force:appHostable,flexipage:availableForAllPageTypes,force:hasRecordId" access="public">
- <aura:attribute name="contactRecord" type="Contact"/>
- <aura:attribute name="recordError" type="String"/>
- <aura:attribute name="returnedError" type="String"/>
- <force:recordData aura:id="recordLoader"
- recordId="{!v.recordId}"
- mode="EDIT"
- targetFields="{!v.contactRecord}"
- targetError="{!v.recordError}"
- fields="FirstName, My_Test_Formula__c"/>
- <!-- Display Lightning Data Service errors, if any -->
- <aura:if isTrue="{!not(empty(v.recordError))}">
- <div class="recordError">
- <ui:message title="Error" severity="error" closable="true">
- {!v.recordError}
- </ui:message>
- </div>
- </aura:if>
- <div>
- {!v.contactRecord.FirstName}
- <lightning:button class="slds-button" onclick="{!c.changeNameToSusie}">Change Name</lightning:button>
- </div>
- <aura:if isTrue="{!not(empty(v.returnedError))}">
- {!v.returnedError}
- </aura:if>
- </aura:component>
Add Comment
Please, Sign In to add comment