Created
November 13, 2018 12:49
-
-
Save simpluslabs/eba72b85ae3cac2b0f21dcae126e537a 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 implements="flexipage:availableForRecordHome,force:hasRecordId"> | |
<aura:attribute name="recordError" type="String" access="private"/> | |
<force:recordData aura:id="recordHandler" | |
recordId="{!v.recordId}" | |
fields="Id" | |
targetError="{!v.recordError}" | |
recordUpdated="{!c.handleRecordUpdated}" /> | |
<!-- Display the delete record form --> | |
<div class="Delete Record"> | |
<lightning:card iconName="action:delete" title="Delete Record"> | |
<div class="slds-p-horizontal--small"> | |
<lightning:button label="Delete Record" variant="destructive" onclick="{!c.handleDeleteRecord}"/> | |
</div> | |
</lightning:card> | |
</div> | |
<!-- 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