I am trying to make a button in Apex submit a page and execute validations while redirecting to another page. I can easily do one or the other through the "Action when clicked" ability, but is there a way to get both functions out of the same button at the same time? Thank you
You can create a button of type submit, and choose the name of that button in your validation attribute "When Button Pressed".
This works for me:
1) create an application item called APP_ERROR
2) create a branch process that consists of a PL/SQL function returning a page number. The code can be something like this:
if 1=1 -- put your validation here
then :app_error := 'Validation error';
else return 20;
3) In the page you want to branch to (i.e. 10) have a before header process with this code:
if :app_error is not null
then apex_application.g_notification := :app_error;
:app_error := null;
If you need it to work for a certain button then just check the value or request when you do the validation in step 2.