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
Animesh DattaAnimesh Datta 

open a visualforce page on click of a custom button


I want to open a Visualforce page in a new window onclick of a Custom button which is on Standard Case Layout details page. But Onclick of this button, Page is opening up always in new tab in all browsers, but I need a new Window. Please help.

Onclick Javascript for Custom Button on Case Layout:'/apex/myAccountCasepage?id={!Case.Id}');

Note: I am not using any service console.
James LoghryJames Loghry
The following should work, based on this thread:'/apex/myAccountCasepage?id={!Case.Id}'', '_blank', 'toolbar=0,location=0,menubar=0');
Animesh DattaAnimesh Datta
Hello James,

Tried with this, but didn't work. Still the page opens up in a tab.

Animesh DattaAnimesh Datta
It worked for me with a small chnage in bold. Thanks!'/apex/myAccountCasepage?id={!Case.Id}',"myaccounts","menubar=0, toolbar=1, resizable=1, width=600, height=400
Vijay Kumar 458Vijay Kumar 458
how to write class code to get Account.Id