Reputation: 11
i have an interactive form. after an insert or update on any particular form i would like the form to be submitted if it passes validation and there is no errors AND THEN i would like to be redirected to another page in the application.
I created a branch to execute and redirect to 'page 2' for example using 'after processing' as the point of execution and 'Page or URL (Redirect)' as behavior. the branch works fine - it validates before etc etc. however upon a successful form insert or update, the form submits but does not redirect me to my chosen page.
any reasons as to why?
Upvotes: 0
Views: 1297
Reputation: 143023
Procedures, as well as branches, "fire" in order determined by the sequence value.
So, if - for example - one procedure raises an error, the rest of them aren't executed.
The same goes for branches - check whether there are several of them (for example, one that leaves you on this page; another which returns you to an interactive report; yet another one which redirects to some other page). If one of those branches branches first, the rest of them won't "work".
Therefore:
when button pressed
property so that Apex knows which branch to use when certain button is pressedtype
Also, enable debugging, run the page and view debug info - it'll show what's going on and, hopefully, let you understand what you should do to fix the issue.
Upvotes: 1