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
AbAb 

When a button is clicked, call a method in class by passing few parameters

Hello,

I have certain fields on my paglayout. X, Y, Z.

I want to ad a button on the page, say..Custom button.

When "Custom button" is clicked, i want to call a APEXclassName.FunctionName(Value of CustomField X, Value of CustomField Y, Z).

I want to execute like this.

How cani implement the same

Thank you in advance
Best Answer chosen by Ab
Vishal_GuptaVishal_Gupta
Hi Sandrine,

you can create a custom button on your layout, please check the attached screnshot. Let me know if its resolve your query. Thanks
User-added image
 

All Answers

Meghna Vijay 7Meghna Vijay 7
Hi Sandrine,

Are those fields of a specific object and what happens when the custom button is clicked?

Thanks
AbAb
when a button is clicked, i want to send values of 3 custofields. 
all the fields of the specific object, which will be visible on the same page layout and button too will be visible
Vishal_GuptaVishal_Gupta
Hi Sandrine,

you can create a custom button on your layout, please check the attached screnshot. Let me know if its resolve your query. Thanks
User-added image
 
This was selected as the best answer