SuiteScript 2.1 Limitations
Created: October 14, 2020
After a couple of SuiteScript 2.1 emails, some helpful readers have pointed out some limitations and asked some questions. While the addition of new and powerful syntax is excellent and very much worth your time to explore, there are limitations to the support NetSuite offers.
Anon E Moose points out that the Debugger does not support 2.1 (shared
with permission, name obscured by request) :
I'm surprised that you are promoting 2.1 emails. I believe that NS still has not exposed 2.1 to the debugger that makes unusable from my point of view.
Great point! If you are an avid user of NetSuite's debugger environment, then 2.1 will not be viable for you. I have never been a Debugger developer myself, but if you are, be aware of this limitation.
Reader Clay Roper points out a bit more nuance:
Quick question re optional chaining - are you able to get this to work in server SS2.1? My understanding is that Graal VM runs ES2019, so this (and features like nullish coalescing) aren't available there just yet.
Yet another great point disguised as a question. According to the SuiteScript 2.1 Help page, Clay is correct that NetSuite only supports up to ES2019, which does not include Optional Chaining, Nullish Coalescing, and some other very cool features. That said, you can still take advantage of these in Client Scripts (the previous caveat still withstanding) because nearly all major browsers support a much newer standard than does NetSuite's server side.
Thanks for keeping me in line, everyone!