-
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 Data Cloud: Features & Use Cases
Salesforce Data Cloud, formerly known as Salesforce Data.com, is a robust data-as-a-service platform provided by Salesforce, one of the world’s leading customer relationship management (CRM)…
Salesforce App Development Lifecycle – Get your App on AppExchange
Even before you start coding and materializing your fabulous app out of thin air, or computer air, it is very important to establish a development…
An Introduction to Salesforce Wave Analytics
Analytics is secure, trustable, scaled and also it is responsive to access on every media screen. It can be easily used in org to handle…
Popular Salesforce Videos
How to Report on the Reports in Your Salesforce Org
Do you want a list of all the reports in your Salesforce org? Would you like to see a list of reports and the last…
Salesforce Lightning Process Builder: Lightning Process Builder Basics
The Salesforce Lightning Process Builder is a new workflow tool that helps anyone in your company quickly and easily automate business processes such as employee…
How the Salesforce Ecosystem Helped My Career
Welcome back to 100DaysofTrailhead.com! Your involvement in the Salesforce Ecosystem can be a great boost to your career. In this video, Eric talks about the…