![]() |
clearString neatComponents
|
|
clearString neatComponents Deleting Records - best practice |
![]() | ||
![]() | How-to Resources | ![]() |
Deleting Records - best practice | ||
![]() | ![]() |
There are many scenarios where you need to allow a user to delete a record, where:
If there are no dependencies, the record should truly be deleted, but
If there are dependencies, or related records that rely on it being retained for audit purposes, the record should appear to be deleted, but in fact it is only 'soft deleted' with a checkbox flag set to hide it.
To do this:
Add fields to the Table
![]()
Now create a Data Entry Form, based on this Table
in this:
.png)
.png)
.png)
In the Events tree for the Table:
.png)
Under the Record Change event:
Under this:
Note: The Delete Record action will only succeed in deleting the record if the Referential Integrity rules are satisfied - ie there are no related records that prevent it being deleted. If they do prevent it being deleted, then the IsActive field, set to false, can be used to hide the record from the user (using record criteria in query embeds etc)
Finally (assuming the record hasn't been Deleted), the Update Field action "Reset _Action" clears the value from _Action, to avoid confusion in any subsequent user interactions.
Copyright © 2026 Enstar Systems Inc. All rights reserved |