I have a APEX 4.1 page where i display fields to create a new record against a table. I have validations like 'field can not be NULL' on the page (pg#1).
I have 'PREVIOUS' and 'NEXT' buttons on the pg#1. At present when i click NEXT on pg#1, a custom insert process get called and a row get inserted.
The issue is that, for example when user clicks NEXT (on pg#1) he get directed to (pg #2) and there is a PREVIOUS button in that page(pg #2).
If the user clicks PREVIOUS button on pg#2 to see the pg#1, then he click PREVIOUS and go to pg#1.
Now if the user clicks 'NEXT' button on pg#1, Validations get fired from pg#1.
So user is not able to move out of pg#1 with out filling the not null fields on pg#1. How to avoid this scenario.
appreciate your help
Questions: These pg#1 and pg#2 -- are those actual APEX pages?
When I use PREV and NEXT, it has been exclusively for changing the rows displayed on a particular page. That is, I stay on the page but the pagination changes. Say, first it has records 1-10. I press NEXT and get records 11-20 but it's still the same page.
I'd choose different buttons to change pages. But maybe it amounts to the same thing either way you do it. If you need certain functionality the first time you change pages but not the second time, you will have to track when is the first NEXT press versus the next NEXT press and only allow the validations to fire the first time. Maybe you need a First Time Flag as part of the validations conditions. And the validations only fire the first time -- until they are reset.