My current formula works fine for parent record deletion but i am unable to get logic for related child record deletion.
Is it possible to delete child record 1st and then parent with single click button from view/edit mode of the parent records.
Thanks in advance.
You should be using a pure script solution and calling QuickBase's API methods using AJAX without loading new pages and subsequently closing them. The response of most of the API methods in QuickBase's API are not intended to be displayed unless they return HTML (most API methods return XML).
<BODY onLoad="closeit()" onunload="refresh()">
and api_delete the records with parameter rid and unfortunately we are calling this button from parent table so we don't have that here. the only thing we have here is related record id, which is actually the key field of parent table.
so is there a way to get the rid of all child records those are related to parent record and then delete.
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.