-
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
4 Tips on How Salesforce Professionals Can Improve Their Communication Skills
There’s a reason “Communication is key” is such a popular saying. Effective communication is an important soft skill in the workplace and is the key…
Salesforce REST API
This post will describe the Salesforce Rest API and how to get the usage from the Salesforce Rest API using a connected app. Don’t forget…
Why Automate Sales Contract Management in Salesforce?
Sales contract management reflects how a company organizes all steps of the sales flow and is essential for recognizing revenue. It is no surprise that…
Popular Salesforce Videos
Add In-App Guidance to Salesforce Lightning Experience
In Lightning Experience, add prompts that appear on-screen to users working in an app. Use prompts to onboard and train users, highlight configuration changes and…
See how fast and easy you can make intuitive Salesforce solutions to your users with Cauzali.
Instead of coding or very complex flows use Cauzali. Place your Cauzali model everywhere in Salesforce including in the middle of a Flow. Price between…
Create an Email Alert Workflow Rule | Workflow Rules in Salesforce | Salesforce Automations
Configuring Workflow Rule Email Alerts or Notifications Follow. Workflow Rules are automatic processes that trigger an action when a certain event occurs, such as updating…