How to handle dangling references to deleted records

Not a solution but an alternate option - sometimes it is easier not to delete the row but rather mark it as ‘archived’.

The benefits being you don’t have to deal with deleted rows and it won’t break any code that relies on those rows. You also have the opportunity to restore rows that have been archived.

The downsides are that you have to add exclusion logic to your search functions (not difficult) and you also need to handle the rows that are still linked to archived data.

3 Likes