Parent/Child Record Relationship | Discussions

Expand all | Collapse all

Parent/Child Record Relationship

  • 1.  Parent/Child Record Relationship

    Posted 06-26-2018 20:34
    Is there a way to prevent the deletion of a parent record if  child records exist?


  • 2.  RE: Parent/Child Record Relationship

    Posted 06-27-2018 13:10
    There was a similar post last week about customizing how records are deleted.  My solution was to indicate records should be deleted and have someone else do the deletion as a double-check.  Mark Shnier suggested "marking" a record for deletion and then using an automation to actually perform the deletion - within which you can build rules etc.  So, for example a user would click a button to "delete" the record; but it would only delete via the automation if there were no children.  Also, you could have a second-automation that if the "delete" marker was populated and there were children; it would "undo" the marker field (checkbox, date field etc.)


  • 3.  RE: Parent/Child Record Relationship

    Posted 06-28-2018 13:21
    Thanks, but in this case I don't want to allow the user to delete the parent record if children exist. 


  • 4.  RE: Parent/Child Record Relationship

    Bronze
    Contributor
    Posted 06-28-2018 14:00
    If you pass a summary up to the parent and it is populated that means there is at least one child record. Using the summary field you can do the following.
    Remove all QB delete & grid edit controls.
    On the parent add a check box named delete.
    Put a form rule that prompts the user if there are child records or hide the delete checkbox until there are no child records.
    Modify default reports to filter for delete check box.
    Set up a weekly automation or do it manually to remove the deleted parents.