Is there an easy way to test whether the primary key of a record is referenced in any other table in the database without going and searching for said primary key in all the applicable tables?
I want to know before I get to the exception, and disable a delete button.