-
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

Different Clouds in Salesforce and Potential Future
Salesforce offers a range of cloud-based software solutions that are designed to help businesses of all sizes manage their customer relationships, sales and marketing efforts,…

Salesforce Apex Trigger - Count Number of Open Tasks and Closed Tasks on the Account.
Hello guys, Today, I'm sharing the trigger code that how you can count the number of open tasks and closed task on the account. For…

No Code Salesforce and JotForm Integration | Salesforce Guide
One of the most popular cloud-based form automation solutions, JotForm enables users to design and manage web forms as well as track user feedback. It…
Popular Salesforce Videos
Salesforce Integration with Heroku
You can integrate Heroku and the Salesforce Platform in several ways, and choosing among them comes down to understanding your requirements and the capabilities of…
Introduction to Salesforce CPQ | EP1
Session 1: Introduction to Salesforce CPQ: The video provides an introduction to the general quoting challenge many Customers face, and how Salesforce CPQ with its…
Sharing and Visibility With Salesforce
Watch this amazing to understand the Salesforce sharing model, and how to structure profiles, roles, and sharing rules to control visibility. Do let us know…