Hi there,
How can I create automation script to delete a record when I’m changing the status to Delete.
I hope someone can help me. Thank you!
@kuovonne help!
Hi there,
How can I create automation script to delete a record when I’m changing the status to Delete.
I hope someone can help me. Thank you!
@kuovonne help!
HI @kuovonne It doesn’t work on my end.
I tried this script
let table = base.getTable(“BILLING”);
let inputConfig = input.config();
let recordId = inputConfigC‘recordId’]
await table.deleteRecordAsync(recordId);
But it has an error with this
ERROR
TypeError: Invalid arguments passed to table.deleteRecordAsync(recordOrRecordId):
• recordOrRecordId →
recordOrRecordId should be a Record, not undefined
or recordOrRecordId should be a string, not undefined
at main on line 4
hope you can help me with this.
I want all statuses with “DELETE” will be deleted on the BILLING table.
Have you set up recordId
as the input variable for the script?
Hi, thank you for your response. How will I do that?
What I did is like this.
The status of delete needs to go in the automation trigger, not the input variable for the script.
You need to create an input variable named recordId
and select the value of the record id of the triggering record. (Use the blue plus sign to select the value.)
I think I’ve already done that. Can you please check if this correct?
I got it! It works now life a charm! Thank you @kuovonne
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.