Skip to main content

Can you help.

I need to replace a linked field with a string - both in the same table. Here's my code:

 

The problem is on line 23.

 
If I run it as the following it works fine. However "YSW CC2" is a text field.
23        await mainTable.updateRecordAsync(record, {"YSW CC2": returnValue
 
If I run it as the following it comes up with the error below. "Contact Name " is a linked field.
23       await mainTable.updateRecordAsync(record, {"Contact Name": returnValue

 

If I try the format as suggested by @Karlstens "Updating record Linked Field with a string array" I still get the error.

23    await mainTable.updateRecordAsync(record, {"Contact Name": [{id:'${returnvalue}'}]
 
 
Can anyone help. I can't work out what I'm doing wrong.
 
Much appreciated 🙂

What type of field is Contact Name


What type of field is Contact Name


Contact Name    is a linked field. It's a String format


Contact Name    is a linked field. It's a String format


So the variable returnValue needs to be a record ID and you also just need to type returnValue not '${returnValue}'. To get the ID, just do rangeRecord.id

Also for future refence, the correct notation is  `${variableName}` not '${variableName}'


Reply