-
How to return reference to home page of object in Salesforce when clicked on a button?
I need to override cancel button in VF page in Salesforce. I tried using return null in
public pageReference cancelButton() {
return null;
}But it is not going anywhere after clicking on Cancel button.
I tried to use:
PageReference oppPage = new ApexPages.StandardController(opp).view();
oppPage .setRedirect(true);
return oppPage ;Still, it is not working.
Does anybody have an idea how to navigate to Opp Home page if we click on cancel button in VF Page?
Log In to reply.
Popular Salesforce Blogs
Salesforce vs. Hubspot - Which CRM Is the Best for You
At the heart of every sales and marketing team is customer relationship management (CRM) software that makes everything that they do work seamlessly. If you…
Salesforce Slack Acquisition – 5 Reasons Why This Merger is the Best Thing Since Sliced Bread!
Salesforce is bringing in a huge wave of features and services for its users this year. Before the end of 2020, Salesforce signed a $27.7 billion megadeal to…
Salesforce Flows - What You Need to Know
Businesses strive to grow bigger and better, but the amount of complex processes becomes trickier to manage without a reliable system that can streamline multiple…
Popular Salesforce Videos
Salesforce Trailhead - Control Access to Fields
In this video, Your Coding Buddy covers how to control access to fields in Salesforce Trailhead. He explains that this is important for keeping data…
Introduction to Asynchronous Apex In Salesforce
Here is the first video on Asynchronous Apex where you get a bit idea of why to use and why there is a need for…
Respecting Data Protection Laws on Salesforce
This video tells us all about data protection regulations and how to implement them on the Salesforce platform when designing custom solutions: - Introduction to…