+ 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={!Account.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 windows.open in the above code, it is opening in new window. 

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

Can we have it opened in the same window ?