zvictor
12/23/2020, 7:08 PMdefine
statement.
1. Requiring a SS2.1 module in a client script via define
will not cause errors in the evaluation of the client script. The client script is evaluated correctly as a non-SS2.1 client script. NetSuite checks the doc block for special tags, the entry-point definitions, etc.
2. The SS2.1 custom module is evaluated correctly as a separate module. It does not have to satisfy the requirements of a client script. In that regard, a custom module has no entry points.
3. A "conditional require that only runs in the browser" is not a solution. That would be OK for any scripted functionality that exists independent of the functionality of the client script functions, but that is not the purpose of this suggestion. The purpose of requiring the custom module is so that you can call functions that exist within the same scope of the functions defined in the script.
Please test assumptions! Your code will be better for it.battk
12/23/2020, 9:20 PMbattk
12/23/2020, 9:22 PMbattk
12/23/2020, 9:23 PMzvictor
12/23/2020, 11:03 PMzvictor
12/23/2020, 11:04 PMbattk
12/23/2020, 11:15 PMbattk
12/23/2020, 11:18 PMzvictor
12/23/2020, 11:47 PM