-
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
WordPress and Salesforce Integration - What You Should Know
Organizations that want to improve the way they deliver digital assets to their audiences would benefit from using WordPress together with Salesforce. When you deliver…
What are Rendered, Rerender, RenderAs Attributes? | Salesforce Guide
Let us learn about Rendered, ReRender, and RenderAs attributes: Rendered This attribute is used to display a particular field or section based on Boolean value.…
Salesforce Flows and Types of Flows
Salesforce Flow enables you to construct complex business arrangements utilizing clicks, not code. Flow Builder is the most integral asset that a Salesforce Admin has…
Popular Salesforce Videos
See what amazing things Cauzali can add to your Salesforce solution - without code
Use Cauzali to add functionality to your Salesforce community solution. In this video, we have a focus on Salesforce Financial Service Cloud, but Cauzali works…
Salesforce Online Training Videos For Beginners | Campaign Management
Learn all about the Salesforce campaign management in this video. Watch and learn. If you have any doubts or questions, please let us know in…
Visualforce Training for Beginners : Visualforce Tags in Salesforce
This video helps you to learn following topics: Visualforce Tags Standard Controllers Associating a Standard Controller with a Visualforce Page What are action methods? Action…