Skip to main content

Hey!

I am trying to update a record based on the user's id, currently, I have this code but for some reason it errors saying: 

TypeError: Invalid arguments passed to table.updateRecordAsync(recordOrRecordId, fields):
• recordOrRecordId →
recordOrRecordId should be a Record, not a number (5)
or recordOrRecordId should be a string, not a number (5)

Basically I am trying to update the field URL for the user based off their user id, the text I want in the field URL is from the "strHash" string

let table = base.getTable("Participant");
let record_id = inputConfig.record_id;

await table.updateRecordAsync(record_id, {
"URL": strHash
})

 

 

 

Update! I fixed this error and now I have this error... 

Error: Request parameters failed validation.

 


Try using 'Airtable record ID' in your config and correcting the typo with 'inputConfig'

let table = base.getTable("Participant");
let record_id = input.config().record_id;
let strHash = 'test'
await table.updateRecordAsync(record_id, {
"URL": strHash
})

Not sure if the snippet you pasted is all your code, apologies if it wasn't!


Try using 'Airtable record ID' in your config and correcting the typo with 'inputConfig'

let table = base.getTable("Participant");
let record_id = input.config().record_id;
let strHash = 'test'
await table.updateRecordAsync(record_id, {
"URL": strHash
})

Not sure if the snippet you pasted is all your code, apologies if it wasn't!


THANK YOU!


Reply