Hello, does including external library in suite sc...
# general
l
Hello, does including external library in suite script require some additional steps? I need to include one in bundled scripts (library can either be bundled or not; would prefer not to), however whenever I try to define and use it, I get the following error while saving a file:
You do not have permission to load this module xlsx.full.min.js, it has an @NModuleScope of SameAccount
. Bundled script has
@NModuleScope public
, but library has nothing of sort.
s
Did you give the library an NAPiVersion? Worth a shot
l
Hm... When I specify NAPIVersion, I can't upload the library to NetSuite at all because of multiple
define
statements
Okay, using
2.1
instead of
2.x
allowed me to upload a file, but that doesn't solve the permission issue
s
Oh if you didnt put a NModuleScope of the lib then definitely do that
I have this on my
moment.js
in a bundle, never had any problems with it
Copy code
/**
 * @NModuleScope public
 * @NApiVersion 2.x
 */
l
This is what I have as well, and yet I still am unable to save the file that calls the library. Thanks anyway 🙂
Just for future reference - turned out to be my bad, I tried to load library while editing a bundle from outside the account where bundle was created initially. Loading library while editing a file on initial account solved the problem.