Skip to main content

I am creating a new record triggered by a script with the following code:

 
let newRecs = {};
newRecs[0]['id'] = 'recDYGIT7fj80tTAH';

await table.createRecordAsync({
'Start Date/Time': billTillDate,
'Contact': newRecs,
'Notes': 'New Record note'
});

I am getting the following error:
 

 

TypeError: Cannot set properties of undefined (setting 'id')
 
Can you please modify the script - assuming the record Id is correct - so I can populate my Contact link field?
 
Thank you!

Never mind fixed it with the following code:

await table.createRecordAsync({
'Start Date/Time': billTillDate,
'Contact': [{id: 'recDYGIT7fj80tTAH'}],
'Notes': 'Working!'
});
 
Closing issue now 

Reply