Skip to Main Content

APEX

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!

After Button Click, I Want to Show A Confirmation Box, then Trigger Update Record Operation & Redire

DannyS-OracleJun 23 2016 — edited Jun 23 2016

Hi guys, new to Apex here! So far so good, but I found trouble on finding out the right way to implement stuff.


I have a page to show a record's values, followed by a "Cancel Request" button at the bottom of the page. I would like to implement this use case:

  1. When the "Cancel Request" button is clicked, I want to show a standard confirmation box - asking "Are you sure bla-bla" with Yes and No options.
  2. If Yes, I want to perform 2 actions: first is updating the record in the DB (simply setting the "Status" column of the record to CANCELLED), and second is redirecting to another page in the application. 


How should I implement each step and actions appropriately? I read the documentations and discussions, but there are so many options to choose such as putting Dynamic Actions on the button, or Process, or JavaScript in the Header of the page. Can someone guide me to the best practice to implement these? Thanks!


P.S. I am using APEX 5 with theme Vita.


Danny


UPDATE:

Pmon provided a good approach. Just a little bit addition from me at the bottom of this thread ("Marked as Helpful") to make the Update SQL executed after clicking OK on the confirmation box.

This post has been answered by PMON on Jun 23 2016
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jul 21 2016
Added on Jun 23 2016
4 comments
2,594 views