+ Start a Discussion
Priyanka ChandrakanthPriyanka Chandrakanth 

Page.existingPageName

Hello I am trying refer another VF page B when a command button is clicked on VF page A. I have notices that, in url it doesn't update the page name from PageA to PageB. How can I overcome this problem? I know that we can use setRedirect(true) when I am creating a pagereference, but I would like to know how can I achieve the same functionality with 
Page.existingPageName. Thank you very much in advance
ganta gadbadganta gadbad
Hello Priyanka you can do something like this where in the button click opens the new page within the same page
--> on VF Page A use this part


<apex:commandButton action="{!save or edit or cancel}" onclick="window.open('Page B(Your vf page name)', '_self', '')"/>