-
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
Useful Salesforce Steps and Instructions – Part 3
Hello All, Here's an another part for various steps and instruction that are very useful in Salesforce. Steps to add picklist values for specific record type:…
The Benefits of Using Salesforce Nonprofit Cloud
IT technologies satisfy almost all the needs of commercial organizations, but nonprofit organizations that work on outdated software are left unattended, unable to embrace new…
Get Selected Records from ListView in Visualforce Page | GETRECORDIDS JavaScript | StandardSetController Salesforce
In this article, you will learn to use GETRECORDIDS function to get selected records IDs in Visualforce page. Requirement - Convert onclick JavaScript on custom…
Popular Salesforce Videos
Salesforce Tutorial | Data Extensions in Marketing Cloud
In this video, we are going to show you something so simple, yet so powerful, you may not even know it existed. For more Salesforce…
How to Become a Salesforce Developer? No Programming Experience Needed
Salesforce Developer has once again been named one of the world's best jobs. In a list of 25 job roles, Salesforce was the only company…
What Are Roll-Up Summary Fields in Salesforce? | Video Tutorial
A roll-up summary field calculates values from related records, such as those in a related list. You can create a roll-up summary field to display…