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
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"