Skip to main content

Hi everyone, I’m trying to write my first automation and could use your help with some basics.



I need to use an automated script to modify multiple fields of the record and then I also need to take values to manipulate. The script below throws me the following error:



TypeError: Invalid arguments passed to recordQueryResult.getRecord(recordId):

• recordId should be a string, not undefined

at main on line 4



I have an input variable defined:



name: ID

id: record (Step 1: Trigger) | Record ID



Then my script looks like this:



let table = base.getTable("Books");

let pitch = input.config;

let allrecords = await seriesTable.selectRecordsAsync();

let record = await allrecords.getRecord(pitch.ID);

await table.updateRecordAsync(record, { 'Status': 'Cancelled' });

let title = pitch.title;

Oops, looks like I forgot the parentheses after input.config();


Reply