createfile

Note:

SuiteCloud CLI for Java has reached end of support. The final available version is 2025.2. Oracle no longer provides new releases, features, or issue fixes. The CLI will remain available for download until the NetSuite 2027.1 release. Transition to SuiteCloud CLI for Node.js, SuiteCloud Extension for Visual Studio Code, or SuiteCloud IDE Plug-in for WebStorm.

Creates a SuiteScript file of the script type you specify in a SuiteCloud project, which can be either an account customization project or a SuiteApp project.

Syntax

          sdfcli createfile [-type]
    [-module]
    <-path>
    <-project> 

        

Options

Option

Required / Optional

Description

-type

Optional

Specifies the script type for the SuiteScript file that you want to create. For example, you can specify the map/reduce script type the following way: -type 'mapReduce'.

For a list of available SuiteScript script types, see SuiteScript 2.1 Script Types.

-module

Optional

Specifies the SuiteScript modules that you want to add to the SuiteScript file. For example, you can specify N/currency and N/email modules the following way: -module 'n/currency n/email'.

For a list of available SuiteScript modules, see SuiteScript 2.1 Modules.

-path

Required

Specifies the path and file name for the SuiteScript file you are creating. For example, you can specify to create a script in the File Cabinet of your SuiteApp project the following way: -path 'FileCabinet/SuiteApps/com.example.currency/currency.js'.

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

-project

Required

Specifies the path to the folder with your SuiteCloud project. For example, -project 'c:projects/com.example.currency'.

Example

Here's a command that creates a file:

          sdfcli createfile -type 'mapReduce'
-module 'n/currency n/email' 
-path 'FileCabinet/SuiteApps/com.example.currency/currency.js' 
-project 'c:projects/com.example.currency' 

        

Related Topics

General Notices