So my team found that loading properties of fields...
# suitescript
t
So my team found that loading properties of fields (i.e. "isDisplay" "isVisible") loaded from records in dynamic mode throws errors on the server side for suitescripts utilizing SS 2.1. The script fails in the highlighted part in 2.1 but not 2.0. This is especially confusing because JS should never throw errors for undefined properties
b
isDisplay uses a getter
So there is supposed to be a function call
t
Its a boolean in the documentation
t
Its under "Property" in the NS docs and described as a "boolean"
b
the getter is supposed to return a boolean generated by the function call
getters and setters are used everywhere in suitescript 2
t
As a property it works in 2.0. We do not use a "getter"
it breaks when set to 2.1
b
im explaining why you are getting a function related error
isDisplay isnt actually a property, its a function
that netsuite evidently didnt implement correctly
t
Run as a function it errors out still
b
you dont call it like a function
thats not how getters work
t
Okay so NetSuite is throwing an error because isDisplay is using a getter in its field object behind the scenes and that has a bug?
I thought you were telling me I had to use a function like the old SS 1.0 code and I was so confused
b
i was only explaining why you got an error that looked like it came from a function
t
I understand that now.
@battk Looks like NetSuite picked it up pretty quick. Just need to send them this convo for them to know whats wrong 😆