Skip to main content
Hi,

I have a commandbutton at my page which should open a new window which the mentioned link below. The link work fine, but in the same window, how can I change the code to open a new window if I click the button.

Thanks,

Sascha

apex:commandButton action="{!OpenReport}" value="Report" id="ReportButton"/>

 

public PageReference OpenReport() {

String UserName = [SELECT Id, Name FROM User WHERE Id =: SelectedUserId].Name;

return new PageReference('/00Og0000000LInY?pv0='+UserName);

}

 
7 Antworten
0/9000