-
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
Advice on Launching a Lucrative Career as a Salesforce Consultant
What is a Salesforce Consultant? When adopting Salesforce within an organization, Salesforce consultants are necessary. They support Salesforce project design, planning, and implementation. A thorough…
Types of Salesforce Sales Cloud Services
Modern sales teams need more than spreadsheets, follow-ups, and disconnected tools. They need a system that helps them sell smarter, close faster, and scale confidently.…
The Top 5 Benefits of Web-To-Lead
Web-To-Lead is the process of converting a website visitor into Lead. What is a Lead? A Lead is a potential Customer who is interested in…
Popular Salesforce Videos
Prepare for Your Salesforce Pardot Implementation
If you're preparing for your Pardot implementation, you've come to the right place! Pardot implementation is a complex, multi-step process. In this video, we will…
How to Use Salesforce for Project Management
When you think of CRM software, "Salesforce" is probably one of the first words that comes to mind. But Salesforce can do so much more…
Implement Time Based Workflow | Salesforce Tutorial
If you ask any Salesforce Person, which kind of workflow is difficult to understand and implement, the obvious answer will be the Time Based on…