To open a new page from current page using APEX

The below code is used to open a new page “NextPage” from current page.

public PageReference Next()
{   
  PageReference objPR = new PageReference('/apex/NextPage');
  objPR.setRedirect(true);
  return objPR;   
}

Leave a Reply