```{ "type": "<https://www.w3.org/Protocols/rf...
# suitetalkapi
d
Copy code
{
  "type": "<https://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.1>",
  "title": "Bad Request",
  "status": 400,
  "o:errorDetails": [
    {
      "detail": "Error while accessing a resource. You have entered an Invalid Field Value 104691110469121138415 for the following field: custrecord_allowed_blanks.",
      "o:errorCode": "USER_ERROR"
    }
  ]
}
Is it possible to tell which item from the sublist is the bad guy?
e
the one that has Invalid Field Value 104691110469121138415
d
Right
But which of those
Oh that pasted poorly
It's a sublist
That is 3 internal IDs in an array
a
Inside the loop that is setting the line value do a log for the index and the value and you will see which line(index) is trying to set that value... But this looks like a request to an external system maybe and the payload having an invalid value? maybe?
d
Copy code
PATCH /services/rest/record/v1/customrecord_property/2062?replace=custrecord_allowed_blanks HTTP/1.1

{
	"custrecord_allowed_blanks": {
		"items": [ { "id": "1046911" }, { "id": 1046912 }, { "id": 1138415 } ]
	}
}
there is no loop, it's just one array
the problem is one of those object is inactive in netsuite so the whole thing fails
i just have no way of knowing WHICH is the offender
a
Ohh you are using the new RESTful API…. Well no ideal and no a solution for the long run but you could know by removing one of the values and you would know in a max of 3 tries…
d
yeah, i plan on passing ~4,000 values
c
You can go to that custom property record, open up the console and do the following for each ID you are questioning and see which one doesn't set: nlapiSetFieldValue('customrecord_allowed_banks', 1046911);
d
sooo i'm trying to set thousands of custom records with a sublist of thousands of items
and this will update daily
The docs mention an "errorPath" in the response
• o:errorPath (optional) – a machine-readable JSON path that points to the request body where the error occurred.
but i don't receive that
b
Im guessing this is actually a multiselect field, not a sublist
which means your ids should be separated by a
|
in the error message
it wont tell you which one is wrong, but it should be more helpful than one massive number
d
yeah, it's a multiselect, sorry
and yes, the error has a delimiter
but it's the WHOLE list (equal to the one i submitted)
b
you would probably want to generate a list of all the valid values for the field beforehand
which hopefully is only a search/query on isinactive
d
yeah, we started down that route yesterday
was hoping for something more elegant!
but thanks a bunch