-
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
Mastering Salesforce Packages: Managed vs. Unmanaged
Salesforce packages simplify application development, deployment, and distribution in the Salesforce ecosystem. This blog explores Salesforce packages, their significance for administrators, developers, and users. We'll…
3 Tactics to Optimize Your Salesforce Implementation
Salesforce implementation requires substantial planning and investment. While most businesses invest heavily during the implementation phase, only a significant proportion of them reap above satisfactory…
Popular Salesforce Videos
Spring'21 Prior Value in Salesforce Record Triggered Flows - ISCHANGED IN Salesforce Flows
In this video, I'm talking about the Prior value feature in the Spring'21 pre-release that is for the record triggered flow. Pre-Release Org URL: https://www.salesforce.com/form/signup/prerelease-spring21/…
DreamTX Welcome Day 2 | Dreamforce 2020 | Salesforce
If you missed DreamTX DAY 2, then live this amazing experience here, we have covered it all for you. See the power of Customer 360,…
Dynamic Forms | Lightning Record Page | Salesforce
In Summer 20, Dynamic Forms adds the Field Section and Field components to App Builder, so admins can use App Builder to create their page…