Activity Forums Salesforce® Discussions How we can link two Vf pages in salesforce ?

  • How we can link two Vf pages in salesforce ?

    Posted by Hariom Chaudhary on August 12, 2019 at 7:06 AM

    How we can link two VF pages, like with the help of a button click i redirect to another page. Kindly provide some sample code as well.

    Yogesh replied 7 years ago 2 Members · 1 Reply
  • 1 Reply
  • Yogesh

    Member
    August 12, 2019 at 8:35 AM

    Hello,

    Put the below code in the controller action method that is being called on click of command button

    public class myControllerExtension {
    public myControllerExtension(ApexPages.StandardSetController controller) { }
    public PageReference OpenPage() {
    PageReference pr = new PageReference('/apex/Your_Second_Page_Name');
    pr.setRedirect(true);
    return pr;
    }
    }

Log In to reply.

Popular Salesforce Blogs

Popular Salesforce Videos