Creates a SuiteScript file of a specified script type in a specified SuiteCloud project, which can be either an Account Customization Project or a SuiteApp.


            file:create [-- type]




Required / Optional


-- type


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 the list of available SuiteScript script types, see SuiteScript 2.x Script Types.



Specifies the path and filename for the SuiteScript file you are creating. For example, you can specify to create a script in the FileCabinet of a 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.

-i or --interactive


Runs the command in interactive mode.

-h or --help


Prints the help for this command.

Interactive Example

The following command creates a SuiteScript file using the interactive mode:

            ? What type of SuiteScript do you want to create? (Use arrow keys)
> Bundle Installation Script
  Client Script
  Custom Module
  Custom Plug-in
  Custom Record Action Script
  Map/Reduce Script
  Mass Update Script
  Scheduled Script
  SDF Installation Script
  User Event Script
  Workflow Action Script

? Do you want to add SuiteScript modules to the file? (Use arrow keys)
> Yes

? Select the SuiteScript modules you want to add to the SuiteScript file (Press <space> to select, <a> to toggle all, <i> to invert selection)
>( ) N/action
 ( ) N/auth
 ( ) N/cache
 ( ) N/certificateControl
 ( ) N/commerce
 ( ) N/compress
 ( ) N/config
 ( ) N/crypto
 ( ) N/crypto/certificate
 ( ) N/currency
 ( ) N/currentRecord
 ( ) N/dataset
 ( ) N/email
 ( ) N/encode
 ( ) N/error
(Move up and down to reveal more choices)

? Select the folder where you want to create the SuiteScript file (Use arrow keys)

? Enter a name for the SuiteScript file


Non-Interactive Example

The following command creates a SuiteScript file of type Map/Reduce in the FileCabinet folder of the SDF SuiteApp project using the non-interactive mode:

            suitecloud file:create --type 'mapReduce' --path 'FileCabinet/SuiteApps/com.example.currency/currency.js' 


Output Example

When executed, the command produces output that is similar to the following:

            The SuiteScript file was created successfully in C:projects\com.example.currency\currency.js 


General Notices