Database Reference
In-Depth Information
WORKAROUND WORKSHOP: CASCADING DELETES
The “Delete related records” option can be dangerous for a couple of reasons. First, if you turn it on
where it should be turned off, then you can find yourself in an odd situation: Records keep disap-
pearing for no apparent reason. You'll get frustrated if you don't realize how this option works.
But even if you want it on, keep this fact in mind: FileMaker can't bring back a record you delete.
It's one thing if someone accidentally deletes a Jobs record—you just have to look up the Job Name
and then enter it again, being careful to give the job the same ID it had before.
It's something else entirely if you also select the “Delete related records” option in the Jobs-to-Cus-
tomers relationship, and the Customers-to-Invoices relationship, and again in the Invoices-to-Line
Items relationship. You've set up the Towering Inferno scenario called cascading deletes . Because
now, when you delete one job record—perhaps thinking that the job is finished and you don't need
the record anymore—FileMaker also obeys your “hidden” instructions and deletes the Customer re-
cord attached to that Job record, all the Invoices attached to the Customer, and all those line items,
too!
Some people decide it's not worth the risk and leave the “Delete related records” option off even
when it should be on. For a better solution to the cascading deletion problem, read up on how access
privileges can limit who's allowed to delete records on Data Access and Design Privileges .
Search WWH ::




Custom Search