Problem
When deleting a parent record with cascading deletion enabled, a related child record may fail to delete, and the underlying cascade-delete error may not be clearly propagated or logged.
Workaround
Wrap the parent and related-record changes in a FileMaker transaction using the Open Transaction, Commit Transaction, and Revert Transaction script steps. This treats the changes as an atomic unit: commit only if all required deletions succeed, and revert the transaction when an error occurs. Reverting can preserve the original data while allowing the script to capture evidence and investigate the underlying deletion failure.
Original Slack Thread
User UBBJX2EHM: FM question:
If when deleting a record that has related records also enabled to delete and there is a reason a related record can not delete. Does the deleting of the primary record throw an error?
Is it possible to see or log the cascade delete error reason?
User U057L133LV6: You can use *ransactions* using `Open Transaction`, `Commit Transaction`, and `Revert Transaction` script steps) let you update parent and related child records as an atomic unit.
User UBBJX2EHM: thank yeah, I want to find a root cause of an error that (seems) to not get passed up.
will look at that and then when it reverts i have evidence at least