Has anyone seen this before `TypeError: invokeMemb...
# suitescript
d
Has anyone seen this before
TypeError: invokeMember (slice) on [] failed due to: Unknown identifier: slice"
... seems like its coming from NetSuite (since May)
c
looks like its not recognizing your data structure as an array
or it doesn't know about slice but it should since it has a more updated ECMA
b
its going to be one of those things that work in suitescript 2.0 and not 2.1
you are seeing a graal related problem, in this case something is trying to call slice on a java object and cant
d
My issue is ... its not in my code. It appears to be an issue related with record.load API in NetSuite. I've used
slice
once in my code (and I've commented it out). Still have this issue.
b
use suitescript 2.0 instead
c
@battk i'm assuming you've run into this before did you find the root issue? does 2.0 and 2.x use different ECMA versions?
b
suitescript 2.0 runs on rhino, suitescript 2.1 runs on graal
rhino is extremely old, i think it runs on 5.1
suitescript 2.1's version is just regular old, it runs on es2019
c
ah gotcha thought they updated it all to get off of rhino.. makes sense then