When a user tries to delete a code/validation record, I would like to check to see if the code in that record has been used prior to the deletion attempt so I can display a message that is more meaningful than an Oracle constraint error.
For example: "This code cannot be deleted because it has been referenced in a course record. Please inactivate it instead."
Can anyone give me general advice on the approach to take?
My first thought was to create a dynamic action associated with the Delete button. I think there is probably a better way, however.