Skip to main content

Error deleting record via automation script

  • July 13, 2023
  • 2 replies
  • 15 views

Forum|alt.badge.img+6
  • Known Participant

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);

2 replies

Forum|alt.badge.img+21
  • Inspiring
  • July 13, 2023

I tried it and it worked fine.
Is it an effect of the incident?


Forum|alt.badge.img+6
  • Author
  • Known Participant
  • July 14, 2023

I tried it and it worked fine.
Is it an effect of the incident?


I ended up creating another table, same structure, repointing all links & automations to that table, and everything worked. So I have no idea why the prior one didn't work.