Delete button control: Javascript confirm & redirect?
578720Jun 4 2007 — edited Jun 28 2007Hello all,
I have a contract details page that has the following buttons: Save, Cancel, Delete. The Cancel button has a general redirect assigned to it, since no processing is necessary. As for the Save button, the page submits to itself, so the screen just reloads quickly, with a note to show the record was updated. As for the delete button, I don't want the user to remain on a details page for a contract they just deleted, so I wish to redirect the user to my contract search page after the record is deleted. I also want to have the button confirm the deletion before proceeding.
My current page setup is as follows:
SAVE button (template based)
Optional URL Redirect - No Target
DELETE button (template based)
Optional URL Redirect - Page 3 (contract search)
"Request" and other fields here are empty
CANCEL button (template based)
Optional URL Redirect - Page 3 (contract search)
"Request" and other fields here are empty
BRANCHES Information:
Before Validation:
DELETE:
Target type - page in application (3 - contract search)
Request - DELETE
When Button Pressed - BTN_DELETE
After Processing:
Target type - page in application (2 - contract details)
When Button Pressed - BTN_SAVE
Here's my dilemma...under the setup listed above, clicking Delete redirects me to the search page, but the record is not deleted (I do have a DML process set up for Insert/Update/Delete, set up for After Submit). I've tried changing both the button and/or branch properties to set up URL processing, entering javascript to confirm the deletion. No matter the combination I use, either the contract will not get deleted, or the deletion is a success, but I get an error message that there is no branch page set up for that. If anyone has suggestions as to how I can get validation to play nicely with deleting records, it would be much appreciated.
Thanks,
Brian