Hello
I am trying to set up a prompt whenever a record is deleted in a table so that the user's reason for deleting the record can be stored in a table of deleted records. Here's the scenario…
I have a simple table called GEONAMES with two columns - ID and NAME. The table is viewed using a GEONAMES interactive report and edited using a GEONAMES form which allows the user to INSERT, UPDATE and DELETE records. Whenever a user deletes a record in the table, a database trigger is fired which adds the deleted ID and NAME into a second table called GEONAMES_DELETIONS. This second table also has a column called REASON which I would like the user to populate with the reason why the record was deleted.
I thought I could achieve this by setting up a form on the GEONAMES_DELETION table which would be shown whenever the DELETE button in the GEONAMES form is clicked. The user journey would be as follows:
- User selects the record which they want to delete in the GEONAMES table report
- That takes them to the GEONAMES form where they can click the DELETE button to delete the record
- When the DELETE button is pressed, the user is taken to a second form where they can see the NAME they are deleting and a text field where they can input the reason for deletion. This form has a CONFIRM DELETION button.
- User clicks the CONFIRM DELETION button and is taken back to the GEONAMES table report.
In the background, the record should be removed from the GEONAMES table, added to the GEONAMES_DELETIONS table, and the REASON added to the new record in the GEONAMES_DELETIONS table.
I've tried various dynamic actions and page redirects when clicking the DELETE button in the GEONAMES form but am having no luck getting anything to work. Any suggestions would be welcome. I am using APEX 19.2.
Thanks