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
Prasanth Reddy MPrasanth Reddy M 

Calling a visual force page using a command button

Hi Friends,

I have installed a package, it has a custom button for Account object , which is directing to a visualforce page.

I am using visual force page for Accoutn detail and below is the call i am using for the custom button.

 <apex:commandButton onclick="('/apex/texcellency__DefinitiveHospitalManager?id={!}', 'Import DMC Data', '_blank');" />

on clicking above custom button, it is not redirecting to the VF Page "DefinitiveHospotal Manager"

Could some one please help with a solution here.

Prasanth Reddy MPrasanth Reddy M
I have added in the above code, it is opening in new window. 

<apex:commandButton onclick="'/apex/texcellency__DefinitiveHospitalManager?id={!}', 'Import DMC Data', '_blank');" />

Can we have it opened in the same window ?