Loading Modules in SuiteScript

As a best practice, you should load only the modules that are needed by your script. However, you can load all SuiteScript 2.0 modules at one time. Do this by passing the modules’ parent directory to the define() statement and its callback function: define([‘N’], function(N) {…});. This is a convenient way to load all modules but does sacrifice the performance advantage of loading only the modules that are needed. We provide this feature so that you can test and familiarize yourself with SuiteScript 2.0. We do not recommend that you load all modules at once in a production environment.

Leave a comment

Your email address will not be published. Required fields are marked *