-
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

Top 10 Salesforce Interview Questions with Answers
The success and prosperity of any modern business depend on its ability to communicate with customers and meet their demands. That is why efficient Customer…

Best Practices For Defining Business Processes In Salesforce
The meaning of the term business process and the advancement of this definition since its origination by Adam Smith in 1776 has prompted such territories…

A Guide to Customizing Your Salesforce Data Classification Settings
Your Salesforce Org stores a lot of sensitive information — and to help you properly protect it, the platform introduced a built-in data classification tool…
Popular Salesforce Videos
Salesforce Administrator Preparation - ADM 201
Salesforce Administrator Certification exam does not require any specific pre-requisites. But any working knowledge as an administrator or a developer or a functional consultant will…
8 Steps to Become a Salesforce Developer!
Do you aspire to become a Salesforce developer? Are you stuck on what next steps you need to take to become a developer? Check out…
Exploring Technology Choices For Salesforce Integration
Are you struggling to find the perfect technology to integrate Salesforce into your business processes? Integrating Salesforce into your business processes can offer significant advantages,…