-
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
How a Salesforce Customer Portal Reduces Support Tickets for B2B Companies
Most B2B support teams aren't drowning in hard problems. They're drowning in the same easy ones, asked again and again. Where's my order. Can you…
Top 15 Best Salesforce Consulting Firms in 2025
In the fast-paced world of customer relationship management (CRM), Salesforce stands out as a powerhouse platform that enables businesses to optimize operations, improve customer interactions,…
Popular Salesforce Videos
Guide to Salesforce Manufacturing Cloud | Beginners
Unlock the Power of Salesforce Manufacturing Cloud | Streamline Your Manufacturing Operations In this video, we dive deep into Salesforce Manufacturing Cloud and explore how…
What is Sales Cloud in Salesforce? | How it can Help Any business?
In this video, Shrey is not only teaching but also demonstrating the concept of Sales Cloud in Salesforce. 1. What is sales cloud in Salesforce?…
Salesforce Integration Using Oracle SOA Suite
In this video, Bristlecone gives an introduction to Oracle Cloud Adapter for Salesforce.com. Afterwards, he goes into detail about how to integrate Salesforce.com using Oracle…