-
How to override the redirect on saving force:createRecord in Salesforce Lightning?
I need to override the redirect on save of a force:createRecord lightning component.
var eve = $A.get("e.force:createRecord");
eve.setParams({
"entityApiName": "Opportunity",
"defaultFieldValues": {
"AccountId" : accountId
},
"panelOnDestroyCallback": function(event) {
console.log('test');
//console.log(event.getParam("id"));
var urlEvent = $A.get("e.force:navigateToURL");
urlEvent.setParams({
"url": "<some visualforce page url>",
"isredirect": "true"
});
urlEvent.fire();
}
});
eve.fire();
Log In to reply.
Popular Salesforce Blogs

Salesforce Security Model - An Overview
What is Salesforce Data Security? Presently Salesforce offers a thorough and flexible data security model for tying down data at totally various levels to give…

Salesforce & SharePoint Integration – A Combination To Enhance Business Processes
Salesforce SharePoint Integration – Salesforce is the world’s #1 cloud-based CRM giant offering comprehensive CRM solutions to millions of leading brands across the globe. However,…

Top 10 Things to Know About Salesforce
Administrators/Devs/Consultants are a key piece of any business that has a Salesforce execution, they keep things ticking over just as extending Salesforce to incorporate new…
Popular Salesforce Videos
CPQ B2B Commerce Cloud Connector | Salesforce Tutorial
In these difficult economic times, businesses are looking for ways to improve efficiency and reduce the cost of doing business. More than ever, efficiency and…
Spring'21 Prior Value in Salesforce Record Triggered Flows - ISCHANGED IN Salesforce Flows
In this video, I'm talking about the Prior value feature in the Spring'21 pre-release that is for the record triggered flow. Pre-Release Org URL: https://www.salesforce.com/form/signup/prerelease-spring21/…
Apex Scheduler in Salesforce | Asynchronous Apex
Asynchronous Apex 1. Apex Scheduler 2. Interfaces in Apex Scheduler 3. Making callout using Apex Scheduler 4. Points to Remember Upcoming Video on How to…