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
jhelblingjhelbling 

How to determine the button that has been clicked ?

Hi all,

 

I have 2 customized buttons on a layout that called 2 different VF Pages. However these 2 VF Pages only have few differences.

 

I would like to use only a single VF Page and hide some elements depending from which button the VF Page has been called.

 

What I'm missing : how can I determine from my VF Page which button has been clicked ?

 

Thank you very much.

Julien

Andy BoettcherAndy Boettcher

You could specify your buttons as URLs instead of VF references - then pass along a variable in the GET string such as "/apex/pageName?id=something&whichPage=2".

 

Take that variable into your controller and perform your IF/ELSE logic in there...set some flags, whatever needs to happen.

 

-Andy