+ Start a Discussion
Austin_SteveAustin_Steve 

Can you use a trigger to open a custom visuralforce page?

All,

 

I was wondering if it is possible to call a visualforce page from a trigger. I have a field on my account object that if it is true, I would like to call another visualforce page.  

 

Thanks,

 

Steve

 

werewolfwerewolf
No, triggers and Visualforce pages are mutually exclusive.  You could perhaps embed a Visualforce page on your account page that pops open a new window to another Visualforce page if the account is opened and that field is set to true.
Austin_SteveAustin_Steve

In order to do the solution you mentioned, would the embedded page have to have a Controller extension, that basically checked the status of the field in question, and that's what would call the popup page then?

 

Thanks,

 

Steve

 

werewolfwerewolf
Generally, yes.
werewolfwerewolf
Well the controller would just check on the field.  The actual page popping would be done in some Javascript code on the Visualforce page.