I am trying to delete some records from a child table when the parent record is removed. To do so, I have created a view on the child table showing records where the parent link field is empty. On my automation, the trigger is set to be when a record enters that view, the automation fires.
The automation is firing but I get an unexpected permission related error I have not seen before. I am the workspace owner. I can manually delete rows in the UI. This seems simple....what am I doing wrong? I have other delete automations that are still working fine.
Error: You are not permitted to perform this operation at main on line
Code is below
let table = base.getTable("tablename")
let inputConfig = input.config();
let recordId = inputConfig['recordId']
await table.deleteRecordAsync(recordId);