function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Ramya BalakrishnanRamya Balakrishnan 

how to call visual page from another visual page

Hi all
I would like to call a visual page(AddCertifications) from another visual page(ProfileUpadate) in button click. But nothing is coming when i click the button.This is my code
PageReference p = new PageReference('/apex/AddCertifications?id='+cid);
return p;

The requirement is when i click the upload button in ProfileUpadate page , the AddCertifications page will open for uploading file.Both the pages extends different controllor. How to achieve this one? 
Sai PraveenSai Praveen (Salesforce Developers) 
Hi Ramya,

Can you check the solution mentioned in the below stack exchange question. I hope you also have the similar requiremrnt.

If this solution helps, please mark it as best answer.

Nitin ShyamnaniNitin Shyamnani

Hi Ramya,

you have 2 options for this

1. using apex

PageReference pr = new PageReference('/apex/AddCertifications');



return pr;


2. using JS

<button onclick="window.location.href='/apex/AddCertifications?id={!cid}'; "> click </button>