-
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 Announced The End of Life of Permissions on Profiles | The Developer Guide
The time has finally arrived when Salesforce recently announced that the Spring '26 release would mark the end of life (EOL) for permissions on profiles.…
Get your development faster with Apex Code Assistance, Lightning Previewer and PMD Support for Apex in a new release of The Welkin Suite IDE
The Welkin Suite team just finished up its large push to hand out its latest Release for Windows, “Bloom R1”, as they continue toward their…
FlexDeploy Brings DevOps to Mule Integrations | Salesforce
You can build and test Mule Applications or APIs using Anypoint Studio very easily. But when it comes to automating deployments to your environments, with…
Popular Salesforce Videos
What is Salesforce? Why Salesforce? Salary Expectation | Certification Required
Watch this video and learn all about Salesforce and how to make a career in Salesforce. What is Salesforce? Why Salesforce? Salary Expectation | Certification…
Who Should Use SFRA and PWA? | Salesforce Commerce Cloud
Different organizations need different architecture according to their needs. Organizations who want their website built on the latest technology and modern approaches can go towards…
Getting Turn by Turn Directions Between Scheduled Events | Salesforce Maps Mobile
Watch this video to learn how to get turn-by-turn directions between scheduled events in Salesforce Maps Mobile. 00:00 - Introduction 00:19 - Access your Schedule…