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
SundayAdminSundayAdmin 

Open a VF page in a new browser tab, through a button.

Hi,

 

I'm quite new to VF and I'm trying to get a button to open a VF page that I made into a new tab in the browser. The button resides on the Account Detail page and the VF page is setup this way:

 

<apex:page standardController="Account" tabStyle="Account">

    <flow:interview name="Flow_Testing" finishLocation="{!URLFOR('/003/o')}">
        <apex:param name="AccountID" value="{!account.Id}"/>
        <apex:param name="UserID" value="{!$User.Id}"/>
    </flow:interview>
    
</apex:page>

 

Any help is much apprecaitted, as I want to apply the same concept to other buttons/VF pages.

 

Thanks!

 

bob_buzzardbob_buzzard

When you create a custom button on an sobject, there is a dropdown titled 'Behaviour' and you can set that to open the page in a new window (which most browsers will interpret as a tab).  In this case, as you are using the Account standard controller, you should be able to add the button to the Account sobject.

SundayAdminSundayAdmin

Hi Bob,

 

I've already set it up the behavior to open it in a new window, and both IE and Chrome don't add it as a new tab but rather as a new window.

bob_buzzardbob_buzzard

This is usually down to the browser configuration - javascript/HTML just ask for new windows to open, and the browser configuration determines if that is really a new window or a new tab.