Search code examples
netsuitesuitescript

Enable SuiteScript 2.0 in Netsuite


When I try to create a new script record in NetSuite, it doesn't allow me to select API Version 2.0. It just says "Select 1.0 Script Type".

Do I simply have to put in the SuiteScript 2.0 annotations at the top of a 1.0 script, or is there a setting in NetSuite that I have to enable to allow me to create new SuiteScript 2.0?


Solution

  • It's the annotations plus the right script signature.

    When you upload an SS2 file the file's annotations are checked and the script is analyzed for the correct entry point.

    You can't mix different scripts in the same file the way you could for SS1. I generally use a folder to hold scripts of related functionality in SS2.