I did it in server side, but I believe you can do the same for client script, you can refer to your custom library with something like: define(['N/error', 'N/log', './LIB_Netsuite_2_0' ], function(error, log, lib_netsuite) {... Where LIB_Netsuite_2_0 refers to a file LIB_Netsuite_2_0.js in the same folder of your script