-
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
How to Choose the Best Salesforce Consulting Services for your Business?
Today, Salesforce has become an obvious choice for most businesses looking to implement CRM systems. It is used by thousands of companies worldwide. Salesforce helps…
Salesforce Winter '26 Highlights
Summer is coming to a close, and those outside temperatures are starting to drop again. As pools close, schools open back up, and a chilly…
Is Your Healthcare System Stuck in the Past? Meet Salesforce Health Cloud!
Imagine this: You’re visiting your doctor for a routine check-up. You wait forever to get in, then explain your medical history for the umpteenth time…
Popular Salesforce Videos
Salesforce Lightning: Custom Theming and Branding
As part of myLightning, Custom Theming and Branding for Lightning Experience lets you customize key styling elements, such as the global header color, brand image,…
How Customers Embrace Salesforce - Literally!
Get ready to giggle ???? Couldn’t get enough of the famous Key and Peele’s video doing the rounds on social media? Check out our version…
Enterprise Architecture in Salesforce
Enterprise Architecture in Salesforce 0:00 Introduction 3:24 What is Enterprise Architecture? 5:11 Why do we need Enterprise Architecture? 7:00 EA Methodology 11:37 Business Strategy 15:15…