-
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
How to Freeze and Deactivate User Accounts in Salesforce
Introduction Here we are going to learn about how to freeze the user and deactivate the user. If your employee left your company then you…
How to Integrate Salesforce and NetSuite Effectively?
Salesforce is the worldwide leader in making revolutionary business applications, served from the cloud and are designed to help generate leads for an organization. Also, it…
Data Loader in Salesforce - Learn All About it Here
Data Loader is a platform which helps us with the mass import or export of data. It allows us to insert, update, delete, or export…
Popular Salesforce Videos
Explain Standard Business Features of Salesforce?
Standard business features of Salesforce are Contact Management, Opportunity Management, Lead Management, Quote Management, Sales Management and Sales Forecasting. Watch the video to learn all…
DreamTX Welcome Day 2 | Dreamforce 2020 | Salesforce
If you missed DreamTX DAY 2, then live this amazing experience here, we have covered it all for you. See the power of Customer 360,…
Run UI Tests with UTAM | Salesforce Developer Tutorial
Testing apps is critical to ensure quality and there are different types of tests such as unit tests, integrations tests or end-to-end tests just to…