createfile

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 project.

Syntax

          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 the list of available SuiteScript script types, see SuiteScript 2.x 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 the list of available SuiteScript modules, see SuiteScript 2.x 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 that contains the SuiteCloud project. For example, -project 'c:projects/com.example.currency'

Example

The following command 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