Fun detail. NetSuite can sometimes give you back N...
# suitescript
t
Fun detail. NetSuite can sometimes give you back Number Objects instead of Number Primitives which may cause your equivalence operator to fail
s
can you zero in on when you're getting back objects? I can't say I've ever seen that myself, but maybe I'm not looking hard enough
t
to be fair i'm grabbing a value from a record.getValue of a custom field. This is being grabbed from the cache module from a UE script
The value is grabbed from here and stored in the cache
b
it used to be a bigger problem in ss1
😆 1
ss1 had less abstractions between the java code and the javascript code
t
SS 1 WAS a big problem
b
im guessing the ss2.1 cache is closer to the java code
s
p.s as a little shortcut, you can say
.filter( x=> x.startsWith('custrecord')
for simple predicates I think that looks rather elegant.
curious - what is the underlying netsuite field type of that field that's returning a
Number
object?