We can use apex:commandLink to redirect a visualforce page in a new Tab URL using PageReference in apex class.
Sample Code:
VF Page:
<apex:page controller="SampleleRedirect">
<apex:form >
<apex:pageblock >
<apex:commandlink action="{!redirect}" target="_blank">
<apex:commandButton value="Open in New Tab"/>
</apex:commandLink>
</apex:pageblock>
</apex:form>
</apex:page>
Apex Controller:
public class SampleleRedirect {
public SampleleRedirect() {
}
public pageReference redirect() {
PageReference pageRef = new PageReference('http://www.biswajeetsamal.com');
pageRef.setRedirect(true);
return pageRef;
}
}
If showHeader="false" in VF Page, the related list Button Edit/Delete/View won’t work on Service Cloud Console.
When showHeader is set to false, some important JS files needed for the service cloud console to function properly will not be loaded, and hence you may see some issues. It is recommended to leave showHeader as true while using in the service cloud console.
This website uses cookies to improve your experience. We'll assume you're ok with this, but you can opt-out if you wish.AcceptReject