Help

Re: Field [linked record] cannot accept the provided value, what is the error?

Solved
Jump to Solution
1581 0
cancel
Showing results for 
Search instead for 
Did you mean: 
Brandon_Vang
5 - Automation Enthusiast
5 - Automation Enthusiast

Capture

Not sure why I’m getting this error. Using an empty array works and removes the values. Essentially what I’m doing is, I’m matching companies to different events. I want to add the companies that are matched when found in the loop into my field called “Mail_Chimp_Company_LookUp”. This script is automatically updating all records every time an event is created. The results variable is an array of companies that are matched to the event tags.

1 Solution

Accepted Solutions
kuovonne
18 - Pluto
18 - Pluto

You need an array of objects, each with their own record ID. You are putting all the IDs in a single object. Notice that the object key is id and not ids. That is a clue that you need to include only one ID.

Try something like this …


“Mail_Chimp_Company_Look”: [
  {id: Ebay.id},
  {id: Amazon.id},
  {id: FaceBook.id},
],

See Solution in Thread

4 Replies 4

In order to update a linked record field you must use the internal record ID (recXXXXXXXXXXXXXX). It looks like you are using the company name instead.

So, for all the company names in the results array, we need to use their internal record id as input for my lookup field? If I had for example,

Results = [Ebay, Amazon, FaceBook]
Need to get internal id of these records in the table I’m linking to, correct? So, this results in an array of internal recordId for each company name?

“Mail_Chimp_Company_Look”: [{id: [Ebay.id, Amazon.id, FaceBook.id]}

I’m still getting the same error. It shouldn’t really matter what string value I pass into the look-up field, as long as it’s a string.

My query_2.records[j].id is rec1VgmTbsREkyHKP.

kuovonne
18 - Pluto
18 - Pluto

You need an array of objects, each with their own record ID. You are putting all the IDs in a single object. Notice that the object key is id and not ids. That is a clue that you need to include only one ID.

Try something like this …


“Mail_Chimp_Company_Look”: [
  {id: Ebay.id},
  {id: Amazon.id},
  {id: FaceBook.id},
],

Thank you for the clarification, it worked! I appreciate it! I didn’t notice it was an array of ids. I just assumed that after each comma separated value, it would be added to it.