- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-12-2018 10:58 AM
Hello Guys,
I would like to prevent from any user to remove records which have associated record/s to it. I know that I have many ways to prevent deletion of the record through the ACL or the UI Action but none of those giving me the option to check if there are the associated records.
Any suggestion for the best way to do that?
Best wishes,
DH
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-12-2018 11:06 AM
You could write a before delete business rule that queries associated tables to see if there is are records referencing current and then do a setAbortAction(true) if so.
If there is a finite list of tables and fields you can check this is a little easier, otherwise you'll have to do something more like this.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-12-2018 11:06 AM
You could write a before delete business rule that queries associated tables to see if there is are records referencing current and then do a setAbortAction(true) if so.
If there is a finite list of tables and fields you can check this is a little easier, otherwise you'll have to do something more like this.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-12-2018 02:54 PM
Thank you!