Has anyone had this error before: `*message*: "fie...
# suitescript
c
Has anyone had this error before:
*message*: "field.getSublistName is not a function"
I’m trying to set the rate on item receipt. This is the full script i am running… no reference to “getSublistName”?
let ir = record.load({
type: record.Type.ITEM_RECEIPT,
id: 405
})
ir.setSublistValue({sublistId:"item", line: 1, fieldId: "rate", value: 24})
ir.save()
m
Looks like an issue with a user event script on the Item Receipt record.
k
May be you could check any other scripts running against it
m
Your
.save()
may be triggering user event scripts on that record.
c
Hmm we don’t have any custom scripts on that record. We just have the Oracle landed cost setup — wonder if it’s a bug with that …
m
are you getting a stack trace at all? You should be able to wrap your
.save()
in a
try/catch
and inspect the error to see if you can get a file and line number.
c
So, I do have a stack… not sure where I can see which script file would be causing it though…
b
its an uncommon error you can get in client side code
usually not an issue if you use serverside code
c
I see.. I do plan to use this server side, though that is frustrating to test during development
Thanks though, I’ll give it a try serverside