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
MyGodItsColdMyGodItsCold 

can VF pages automatically call each other?

I'm not sure if this is an easy or hard thing to do (my previous work makes me think it's not easy).
 
I'd like 2 VF pages (VF1 and VF2) - and on VF1 there's a 'Go' button which calls VF2 which does some work (e.g. writes "1" to the screen), then goes back to VF1, which calls VF2 again, which writes "2", and so on, until VF2 gets to 10, and then goes on to do something else.
 
Thanks.
ClaiborneClaiborne
I think it is doable. I think the key is to put an action value in your initial <apex:page tag> for your second page. This action value is your first page. Then, when the second page is called, it will execute code in its constructor function, and then go back to the initial page.
Vivek ViswanathVivek Viswanath
HI,

I have done this  put an action on the apex:page section however the controller gets refreshed as you will have to set redirect to true. You will have to pass the value as a parameter in the URL however this is possible.

Regards

Vivek