Creating a SuiteScript File in SuiteCloud Extension for Visual Studio Code

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

To create a SuiteScript file:

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

  2. Open the Command Palette and type suitecloud.

    From the dropdown list, select SuiteCloud: Create SuiteScript File.

  3. From the dropdown list, select the type of SuiteScript file type you want to create and press Enter. For example, selecting 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 list, select the SuiteScript modules you want to add to the SuiteScript file, and click OK. For example, N/currency. You can select one, several, all of them, or none of them.

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

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

  5. Select the folder where you want to create the SuiteScript file, and press Enter. An example of a FileCabinet folder location in a SuiteApp project location is /SuiteApps/com.example.currency. Only valid folders in the SuiteCloud project are available for selection.

    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 are creating. For example, currency.js. If not already specified, the file extension .js is appended to the file.

    The SuiteScript file is created in the specified folder location and opened for editing in VS Code. The file contents are based on a template for the SuiteScript type you specified with the selected modules inserted into the code.

Related Topics

General Notices