Skip to Main Content

Oracle Forms

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Save changes before going to new record

user12294571Sep 11 2011 — edited Sep 13 2011
Experts,
Here is the problem I am having .

Issue: I created a custom form and when I update the record and click next record(down key) it goes to the next record without saving the updated record. When I close the form then only it asks me whether to save the record or not "Do you want to save the changes you have made ?". I want this validation to be done before I move to next record.

What I have done : Created an alert and a trigger :WHEN NEW RECORD INSTANCE" . The logic is when the form status changes to "CHANGED" then show alert to ask whether commits record or not , if clicked "OK" then "COMMIT" else "ROLLBACK". When the user clicks ok it commits the record and moves to the next record. So far so good.

But the problems arises when user clicks cancel, system again asks for "Do you want to save the changes you have made ?" and commits the record upon "Yes" and rollbacks upon "NO" and the main issue the form status goes back to "NEW" instead of going to next record.

So all I need is a message to commit/rollback the record before moving to the next record. It looks really odd when it asks twice one from my alert and other from system.

Please let me know where I am doing the wrong stuff , or if you think my logic is wrong , please let me know how to achieve my scenario.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Oct 11 2011
Added on Sep 11 2011
5 comments
2,112 views