+ Start a Discussion
AichaSFAichaSF 

Visualforce Page - Action Button

Hello,

I have a visualforce page that contains a button and I need to put the hidden button and execute the action of the button at the opening of the page.

Can someone help me.
Martha VMartha V
You call the Apex method you want to excecute from the Page tag 
 
<apex:page
standardController="StandardObject"
extensions="MyExtension"
standardStylesheets="false"
showHeader="false"
action="{!MyApexMethod}">

</apex:page>

if you don't have a standard controller then substitute the standard controller and the extensions for: controller="MyApexClass"