Protection against remove of related data

Hi!
Does anybody know how to set protection against remove of related data and show warning dialog window when you want to remove record which links to other module’s record? Because my installation of suite crm doesn’t let me do this. For example, I can remove contact related to account without removing the relate between them.

SuiteCRM
Version 7.7.4
Sugar Version 6.5.24 (build 509)

SuiteCRM’s architecture does absolutely no “cascaded deletes” or even relationship enforcing. I think this is understandable because of two things:

  • the app writes itself, you can design the database from Studio; this requires some simplifications in order to keep things practical

  • there are so many relationships to some modules that you would effectively have a very hard time deleting a contact if there was this kind of enforcement.

Of course, you still need to manage this characteristics of the architecture in some cases, so I would advise using the necessary “after_save” or after_delete" hooks to do the cascaded deletes, or the before_delete to prevent incorrect deletions.

1 Like

God bless you man, thx! B)