You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In this post we are going to learn about how toCreate a Custom Lightning Component for Show Approve/Reject Status of Selected Records through Modal Popup in Salesforce Lightning Component.
In this post we are going to learn about how toCreate a Custom Lightning Component for Show Approve/Reject Status of Selected Records through Modal Popup in Salesforce Lightning Component.
👉 To get source code live demo link, Click Here.
Create Lightning Application
Step 1:- Create Lightning Application : approveRejectApp.app
<aura:application extends="force:slds"> <c:approveRejectCmp/> </aura:application>
Create Lightning Component
Step 2:- Create Lightning Component : approveRejectCmp.cmp
`<aura:component implements="force:appHostable,flexipage:availableForAllPageTypes,flexipage:availableForRecordHome,force:hasRecordId,forceCommunity:availableForAllPageTypes,force:lightningQuickAction" access="global" >
<aura:attribute name="rejectDocumentMsg0" type="String"/>
<aura:attribute name="rejectDocumentMsg1" type="String"/>
<aura:attribute name="rejectDocumentMsg2" type="String"/>
<aura:attribute name="rejectDocumentMsg3" type="String"/>
<aura:attribute name="rejectDocumentMsg4" type="String"/>
</aura:component>`
Create Component JavaScript Controller
Step 3:- Create Lightning Component : approveRejectCmpController.js
`({
})`
Create Component JavaScript Helper
Step 4:- Create Lightning Component : approveRejectCmpHelper.js
`({
approveActionHelper:function(component, event, helper){
var thisObj = event.target.name;
if(thisObj == 'dataRowIcon0'){
component.set('v.rejectDocumentMsg0','Approved');
}
if(thisObj == 'dataRowIcon1'){
})`
Create Component Style CSS
Step 5:- Create Lightning Component Style: approveRejectCmp.css
.THIS { } .THIS .dataRowIcon .approvalIcon, .THIS .dataRowIcon .rejectIcon{display:none;} .THIS .dataRowIcon .slds-fade-in-open{display:none;} .THIS .dataRowIcon .slds-backdrop_open{display:none;} .THIS .dataRowIcon.showModal .slds-fade-in-open, .THIS .dataRowIcon.showModal .slds-backdrop_open{display:block;} .THIS .dataRowIcon.approve .approvalIcon{display:inline-block;} .THIS .dataRowIcon.reject .rejectIcon{display:inline-block;}
👉 To get source code live demo link, Click Here.
The text was updated successfully, but these errors were encountered: