Skip to main content
Sascha Deinert 님이 #Apex에 질문했습니다
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개
  1. 2015년 6월 11일 오전 10:22
    Hi Sascha,

    Hi Sascha,Please let me know if this helpsBest RegardsNaga Kiran

    Please let me know if this helps

    Best Regards

    Naga Kiran
0/9000