You cannot delete records in table A using a script in table B.
Either create and call a script in table A to do the job, or (simpler) create a layout in table B that is based on the related table occurrence, and use that as the target layout for GtRR; then delete the found set.
I can see where you might want to:
1. Import records from Database A into Database B (relationship of records is established on import via a record id)
2. Delete related record in Database A
If your script in Database B opens Database A, then returns to the window for Database B and Imports Records from Database A, whatever is in the found set in Database A will be imported into Database B. If you select a subset of A, then go to B and import from the open A, then the found set in A will remain as it was, and that found set will be imported into B, remaining as the found set when the import is complete. If your script then returned to the window for database A, and deleted all records, then you'd have a found set in A with 0 records, and any previously omitted records would remain in A. In B, the imported records would be in the foundset in B.
By the way, in your script, there is a place where you say:
Import Records [ "Database A" ; Add ]
Go to Related Record [ Show only related records ; From table: "Database A Table" ; External ; Using layout: "Database A layout" ; New window ]
The Delete Record/Request would only delete one record, and it would do it in whichever table the layout is based on.
This is one of those...BE CAREFUL places.
Thanks for the responses. It's working just fine now using a layout based on the related table occurrences.