The same libray is loaded when in edit mode on the...
# suitescript
h
The same libray is loaded when in edit mode on the record, its just not getting loaded in view mode, even after attaching the script to the record in beforeLoad
s
I seem to recall funkiness when in view mode and client script. Fortunately since it's client script you should be able to see (and use) the library right from the browser dev tools console?
Since SS1 doesn't have modules, I presume your 3rd party library introduces some global variables - confirm they are (or are not) available after the page loads in view mode from the browser console?
h
if global variable name collision were the issue, it wouldn't run in edit mode either
I also tried loading the JS libary w/ SS 2.0 to see its available to 1.0 scripts
s
I think NS loads different libs in edit mode and/or loads them differently than when in view mode
h
some 3rd party libs load successfully in view and edit mode...so I guess the issue is as you pointed out with how the library is declared..i.e. for instance lodash loads in view and edit mode..momentjs doesn't load in view mode
The min versions of both these libraries are coded differently
the problem is the different ways you can create modules in vanialla JS..which module declaration format will work with NS in view and edit mode