Forum Discussion
_anomDiebolt_
10 years agoQrew Elite
>The above code is working fine ...
Your are just making the job harder by using your current approach. You should put all your JavaScript code in a user defined page and invoke it with a button that uses $.getScript() to execute the JavaScript. This code should do the job:
Pastie Database
https://haversineconsulting.quickbase.com/db/bgcwm2m4g?a=dr&rid=460
I would test this in a separate application as both methods API_EditRecord and API_PurgeRecords will not ask for confirmation before deleting the parent / child records. You can of course add you own confirmation logic to the script.
Your are just making the job harder by using your current approach. You should put all your JavaScript code in a user defined page and invoke it with a button that uses $.getScript() to execute the JavaScript. This code should do the job:
Pastie Database
https://haversineconsulting.quickbase.com/db/bgcwm2m4g?a=dr&rid=460
I would test this in a separate application as both methods API_EditRecord and API_PurgeRecords will not ask for confirmation before deleting the parent / child records. You can of course add you own confirmation logic to the script.
NirajShah1
8 years agoQrew Cadet
Dan, I am unable to get this script to work for me. I am also trying to create a button which will delete the parent and all child records.