Skip to main content
Question

URL BUtton using JS to delete record and child records

  • April 22, 2018
  • 0 replies
  • 97 views

I am looking to create a URL Formula Button to put on a table homepage. I want to the button to be able to invoke a warning / confirmation to delete the record (and all its dependents) and when confirmed, the record and its child records should be deleted and then returns the user to the table hompage.

I have an idea how to do this but only for a single record and not it's dependents. 

I appreciate any help!
This topic has been closed for replies.

  • Quickbase Alumni
  • April 22, 2018
Hi Niraj,

How have many related child tables associated with your parent table?

Thanks,
Gaurav

  • Quickbase Alumni
  • April 22, 2018
Suggested strategy:
  1. On the parent record and on the child records, create a checkbox field "Delete This Record"
  2. On the parent record, create a Quick Base action to make "Delete This Record" on related child records to be the same as "Delete This Record" on the parent record, when that field on the parent is modified.
  3. Use the method outlined in this QB tutorial, which explains how to use a service like Zapier (or your own API calls) to accomplish tasks like bulk archiving or deletion:  https://university.quickbase.com/series/advanced-training/record-archiving-and-snapshotting-2503
If desired, you could also modify the report on your table homepage to either not display records where the box is checked or sort them to the bottom. And, perhaps before automating step 3, you could do it manually with reports that filter for records where the box is checked.

I suggest signing up for early access to Automations.


That will allow you to trigger an Autonation when the Parent Record is deleted, to trigger the step to delete the children if that deleted Parent.

Put in a Support ticket to request early access.