Creating a SuiteScript File in SuiteCloud Extension for Visual Studio Code

You can use NetSuite SuiteScript scripting language to extend NetSuite and customize, search, and process your NetSuite data. From a SuiteCloud project, you can create a SuiteScript file based on a script type template, including any modules you pick. For more information about SuiteScript, see SuiteScript Overview.

To create a SuiteScript file:

  1. In VS Code, open the SuiteCloud project where you want to create the SuiteScript file.

  2. Open the Command Palette and type suitecloud.

    From the dropdown, pick SuiteCloud: Create SuiteScript File.

  3. From the dropdown, pick the type of SuiteScript file type you want to create and press Enter. For example, picking Map/Reduce Script creates a file based on the Map/Reduce script template.

    For information about the list of available SuiteScript script types, see SuiteScript 2.x Script Types.

  4. From the dropdown, pick the SuiteScript modules you want to add to the file, and click OK. For example, N/currency. You can pick one, several, all of them, or none.

    Scroll down the list to see all the available SuiteScript modules.

    For the list of available SuiteScript modules, see SuiteScript 2.x Modules.

  5. Pick the folder where you want to create the SuiteScript file and press Enter. For example, a FileCabinet folder in a SuiteApp project might be /SuiteApps/com.example.currency. Only valid folders in your SuiteCloud project show up.

    For information about where SuiteScript files can be stored in SuiteCloud projects, see SuiteCloud Project Structure and File Components.

  6. Enter a name for the SuiteScript file you're creating. For example, currency.js. If you don't add the file extension .js, it'll be added for you.

    The SuiteScript file is created in the folder you picked and opened for editing in VS Code. The file contents are based on the template for the SuiteScript type you chose, with your selected modules added to the code.

Related Topics

General Notices