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
Salesforce  Report IssueSalesforce Report Issue 

Need Help . How to call multiple actions from the same visualforce page action attribute

Hi All ,

I need urgent support . Please help me to resolve the issue .

 

In Visualforce page , is there any way to call the action attribute with two or more methods as like below

 

<apex:page standardController= 'Account' , controller ='DemoReportClass' action="{!method1},{!method1}" >

 

or any appropriate approaches to call the muliple methods ?

 

Please help me ASAP .

 

 

Thanks ,

Raj

 

ClintLeeClintLee

In your controller, you could make a method like this.

 

public PageReference callTwoMethods() {

          methodOne();

          methodTwo();

          return null;

}

 

Set your page tag to this.

 

<apex:page controller="DemoReportClass" action="{!callTwoMethods}">

 

Hope that helps,

 

~ Clint

Salesforce  Report IssueSalesforce Report Issue

Hi Clint ,

Thanks for the Solution ...

That issue has resolved .

 

Thanks ,

Raj

Yogesh BhosaleYogesh Bhosale
But in case we want to execute 2 seprate Transaction in 2 method then how can we do it ?
MonisfdcMonisfdc
@Salesforce Report Issue

I have the similar requirement. How did you implement this?