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
g kg k 

How to open a new window in page Reference method in salesforce?

Ramesh KallooriRamesh Kalloori
we can't open new window in page reference method.

if you want we can do onComplete open new window.

<apex:commandButton action="{!doSomething}" onComplete="doRedirect()" />
function doRedirect()
window.parent.location.href = '';

TC DeveloperTC Developer
take the page reference set it as url of <a> or or a outputlink with a option of new window target property