I’m having an issue using SuiteScript 2.1. When I ...
# suitescript
t
I’m having an issue using SuiteScript 2.1. When I use it in a M/R script, I have no issues using some of the latest JS syntax (let, function shorthand, etc), but when I try to use SuiteScript 2.1 in a library file that doesn’t have a NScriptType defined, I get a syntax error when uploading the file. Is there a reason behind this that anyone is aware of?
I have already verified that the cause of the error is the new syntax (using let in this instance)
s
Are you including the NApiVersion and the NModuleScope in your js library?
t
Aha I did not have the NModuleScope - adding that seemed to fix the problem. Thanks Sandii!