
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Mar 16, 2021 12:44 PM
I’ve written the following script code to update the linked field for a given record in a list, but the script view is giving me an error.
Script:
Type ‘string’ is not assignable to type ‘{ id: string; }’.(2322)

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Mar 16, 2021 02:29 PM
The write format for a linked record field is different for Scripting App/Automations compared to Update Automations and the REST API. You need to use an array of objects with record ids.
It isn’t clear what value you are receiving from inputConfig.customLocationID[0]
, but it is probably a string, and not an array of of objects. Are you using the search automation action to get the customLocationID? If so, I recommend that you do the search within the script itself, instead of using the search action. That will give you better access to the actual records and their ids.
