2 Replies Latest reply on Jan 13, 2012 12:15 PM by philmodjunk

    Delete Related Records



      Delete Related Records


      Hey Everyone,

        How do i setup a way to delete all records related to a client in different databases? My setup is a client enrollment page with an auto generated ID for each client. Anytime that clients info is copied to another database, it uses that client ID to do so. What kind of script would i have to make to do this? Thanks


        • 1. Re: Delete Related Records

           I figured it out. You had to turn on delete related records in the relationships window on the child side.

          • 2. Re: Delete Related Records

            No script may be needed.

            In the relationships that join the parent table to the other related tables by client ID, you can specify "Delete Related Records in this table when a record is deleted in the other table."

            Be careful with this option to make sure that you fully understand the consequences for enabling this option as the resulting "cascading delete" can delete large volumes of related records when you delete a single record in the parent table with no way to "undo" it.