- Open in Visual Studio Code, press Ctrl+Shift+P to open the Command Palette and enter suitecloud. Then from the dropdown list, select SuiteCloud: Create SuiteScript File.
- For the type of SuiteScript file to create, select User Event Script.
- Without any modules selected, click Ok to go to the next step.
- Save the file in the folder.
- Enter the following name for the SuiteScript file.
- The SuiteScript file is created in the specified folder location and opened for editing in Visual Studio Code.
If the above method is not working the follow the steps given below.
- Open the project folder that you are going to do the project.
- Type cmd into the location bar at the top of the window and tap enter to open the command prompt.
- To view the list of commends used in Suite Cloud type suitecloud and enter.
Options:
–version Outputs the version number.
-i, –interactive Runs the command in interactive mode.
-h, –help Displays help for the command.
Commands:
account:manageauth [options] Manages authentication IDs for all your projects.
account:savetoken [options] Saves a TBA token that you issued previously in NetSuite.
account:setup [options] Sets up an account to use with SuiteCloud CLI for Node.js.
file:create [options] Creates a SuiteScript file.
file:import [options] Imports files from an account to your account customization project.
file:list [options] Lists the files in the File Cabinet of your account.
file:upload [options] Uploads files from your project to an account.
object:import [options] Imports custom objects from your NetSuite account to the SuiteCloud project.
object:list [options] Lists the custom objects deployed in an account.
object:update [options] Overwrites the custom objects in the project with the custom objects in an account.
project:adddependencies Adds the missing dependencies to the manifest file.
project:create [options] Creates a SuiteCloud project, either a SuiteApp or an account customization project
(ACP).
project:deploy [options] Deploys the folder containing the project. The project folder is zipped before
deployment, only including the files and folders referenced in the deploy.xml file.
project:package [options] Generates a ZIP file from your project, respecting the structure specified in the
deploy.xml file.
project:validate [options] Validates the folder containing the SuiteCloud project.
help [command] Displays help for the command.
- To create new file use the command suitecloud file:create -i
- Then select the script type as user event script.
- If suitecloud modules are required select yes and choose the required modules from the list otherwise no.
- Select the folder where you want to create the file.
- Give a name to the file, for example: jj_ue_<file description>
- The file will be created in the selected folder, open it in Visual Studio Code for editing.