Kris Reeves
01/09/2024, 7:33 PMconst rec = record.create({
type: record.Type.SALES_ORDER,
isDynamic: false
});
...
const customerId = 268554; // actually the value returned by a search
rec.setValue('entity', customerId);
gives an error: ..."name":"INVALID_KEY_OR_REF","message":"Invalid entity reference key 268554."...
i can see in the UI that a customer exists with this id
is this some kind of incorrect permissions? (i don't think so - i basically copied celigo's permissions for starters)
is entity
the wrong field? do i have to use dynamic mode for some reason?ehcanadian
01/09/2024, 7:37 PMKris Reeves
01/09/2024, 7:49 PMisinactive: "F"
ehcanadian
01/09/2024, 8:00 PMKris Reeves
01/09/2024, 8:01 PMKris Reeves
01/09/2024, 8:02 PMehcanadian
01/09/2024, 8:02 PMKris Reeves
01/09/2024, 8:04 PMKris Reeves
01/09/2024, 8:04 PMKris Reeves
01/09/2024, 8:05 PMKris Reeves
01/09/2024, 8:06 PM@hitc/netsuite-types
repo to help, but i'm not happy with it - seems to be either out of date or mistaken sometimes. this is one instance of such: it says that record.save() returns a number - but it returns a stringKris Reeves
01/09/2024, 8:07 PMKris Reeves
01/09/2024, 8:07 PMKris Reeves
01/09/2024, 8:07 PMKris Reeves
01/09/2024, 8:13 PMrec.id
that's wrong. something that i'm expecting to be a number is a string, at any rateehcanadian
01/09/2024, 8:14 PMKris Reeves
01/09/2024, 8:14 PMehcanadian
01/09/2024, 8:15 PMKris Reeves
01/09/2024, 8:15 PMKris Reeves
01/09/2024, 8:15 PMehcanadian
01/09/2024, 8:16 PMKris Reeves
01/09/2024, 8:16 PMKris Reeves
01/09/2024, 8:16 PMKris Reeves
01/09/2024, 8:16 PMKris Reeves
01/09/2024, 8:16 PMShawn Talbert
01/09/2024, 8:27 PM==
over ===
in many casesShawn Talbert
01/09/2024, 8:27 PMKris Reeves
01/09/2024, 8:34 PMKris Reeves
01/09/2024, 8:34 PM.id
on that record. its type is number
, not number|string
or whatever, so it faked me out 😅Kris Reeves
01/09/2024, 8:34 PMKris Reeves
01/09/2024, 8:35 PMKris Reeves
01/09/2024, 8:36 PM