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 to Create a Lightning Component Button to open New Account in Salesforce.
Create a Lightning Component Action
Creating a Lightning component action is similar to creating a regular quick action, and you do it in the same place in Setup. All you need is a Lightning component in your org for the quick action to trigger. To know more details, Click Here →
In this post we are going to learn about How to Create a Lightning Component Button to open New Account in Salesforce.
Create a Lightning Component Action
Creating a Lightning component action is similar to creating a regular quick action, and you do it in the same place in Setup. All you need is a Lightning component in your org for the quick action to trigger. To know more details, Click Here →
👉 To get source code live demo link, Click Here.
**Create Lightning Component
Step 1:- Create Lightning Component : openNewAccountCmp.cmp
**
`<aura:component implements="force:appHostable,flexipage:availableForAllPageTypes,flexipage:availableForRecordHome,force:hasRecordId,forceCommunity:availableForAllPageTypes,force:lightningQuickAction" access="global" description="c:openNewAccountCmp">
<lightning:card title="Create Account" iconName="standard:account" >
</aura:component>`
Create JavaScript Controller
Step 2:- Create Lightning Component : openNewAccountCmpController.js
`({
createAccount : function (component, event, helper) {
var createRecordEvent = $A.get("e.force:createRecord");
createRecordEvent.setParams({
"entityApiName": "Account"
});
createRecordEvent.fire();
},
})`
👉 To get source code live demo link, Click Here.
The text was updated successfully, but these errors were encountered: