Top Banner
SuiteCloud CLI for Java September 9, 2020 2020.2
34

SuiteCloud CLI for Java - Oracle · 2020. 3. 19. · Customer’s excess use until such time that Customer’s use stays within reasonable limits. ... data, incomplete data, re-run

Sep 04, 2020

Download

Documents

dariahiddleston
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: SuiteCloud CLI for Java - Oracle · 2020. 3. 19. · Customer’s excess use until such time that Customer’s use stays within reasonable limits. ... data, incomplete data, re-run

SuiteCloud CLI for Java

September 9, 2020 2020.2

Page 2: SuiteCloud CLI for Java - Oracle · 2020. 3. 19. · Customer’s excess use until such time that Customer’s use stays within reasonable limits. ... data, incomplete data, re-run

Copyright © 2005, 2020, Oracle and/or its affiliates. All rights reserved.

This software and related documentation are provided under a license agreement containing restrictionson use and disclosure and are protected by intellectual property laws. Except as expressly permittedin your license agreement or allowed by law, you may not use, copy, reproduce, translate, broadcast,modify, license, transmit, distribute, exhibit, perform, publish, or display any part, in any form, or by anymeans. Reverse engineering, disassembly, or decompilation of this software, unless required by law forinteroperability, is prohibited.

The information contained herein is subject to change without notice and is not warranted to be error-free. If you find any errors, please report them to us in writing.

If this is software or related documentation that is delivered to the U.S. Government or anyone licensing iton behalf of the U.S. Government, then the following notice is applicable:

U.S. GOVERNMENT END USERS: Oracle programs, including any operating system, integrated software,any programs installed on the hardware, and/or documentation, delivered to U.S. Government endusers are "commercial computer software" pursuant to the applicable Federal Acquisition Regulationand agency-specific supplemental regulations. As such, use, duplication, disclosure, modification, andadaptation of the programs, including any operating system, integrated software, any programs installedon the hardware, and/or documentation, shall be subject to license terms and license restrictionsapplicable to the programs. No other rights are granted to the U.S. Government.

This software or hardware is developed for general use in a variety of information managementapplications. It is not developed or intended for use in any inherently dangerous applications, includingapplications that may create a risk of personal injury. If you use this software or hardware in dangerousapplications, then you shall be responsible to take all appropriate fail-safe, backup, redundancy, and othermeasures to ensure its safe use. Oracle Corporation and its affiliates disclaim any liability for any damagescaused by use of this software or hardware in dangerous applications.

Oracle and Java are registered trademarks of Oracle and/or its affiliates. Other names may be trademarksof their respective owners.

Intel and Intel Xeon are trademarks or registered trademarks of Intel Corporation. All SPARC trademarksare used under license and are trademarks or registered trademarks of SPARC International, Inc.AMD, Opteron, the AMD logo, and the AMD Opteron logo are trademarks or registered trademarks ofAdvanced Micro Devices. UNIX is a registered trademark of The Open Group.

This software or hardware and documentation may provide access to or information about content,products, and services from third parties. Oracle Corporation and its affiliates are not responsible for andexpressly disclaim all warranties of any kind with respect to third-party content, products, and servicesunless otherwise set forth in an applicable agreement between you and Oracle. Oracle Corporation andits affiliates will not be responsible for any loss, costs, or damages incurred due to your access to or useof third-party content, products, or services, except as set forth in an applicable agreement between youand Oracle.

If this document is in public or private pre-General Availability status:

This documentation is in pre-General Availability status and is intended for demonstration and preliminaryuse only. It may not be specific to the hardware on which you are using the software. Oracle Corporationand its affiliates are not responsible for and expressly disclaim all warranties of any kind with respect tothis documentation and will not be responsible for any loss, costs, or damages incurred due to the use ofthis documentation.

If this document is in private pre-General Availability status:

The information contained in this document is for informational sharing purposes only and should beconsidered in your capacity as a customer advisory board member or pursuant to your pre-GeneralAvailability trial agreement only. It is not a commitment to deliver any material, code, or functionality, and

Page 3: SuiteCloud CLI for Java - Oracle · 2020. 3. 19. · Customer’s excess use until such time that Customer’s use stays within reasonable limits. ... data, incomplete data, re-run

should not be relied upon in making purchasing decisions. The development, release, and timing of anyfeatures or functionality described in this document remains at the sole discretion of Oracle.

This document in any form, software or printed matter, contains proprietary information that is theexclusive property of Oracle. Your access to and use of this confidential material is subject to the termsand conditions of your Oracle Master Agreement, Oracle License and Services Agreement, OraclePartnerNetwork Agreement, Oracle distribution agreement, or other license agreement which hasbeen executed by you and Oracle and with which you agree to comply. This document and informationcontained herein may not be disclosed, copied, reproduced, or distributed to anyone outside Oraclewithout prior written consent of Oracle. This document is not part of your license agreement nor can it beincorporated into any contractual agreement with Oracle or its subsidiaries or affiliates.

For information about Oracle's commitment to accessibility, visit the Oracle Accessibility Program websiteat http://www.oracle.com/pls/topic/lookup?ctx=acc&id=docacc

Oracle customers that have purchased support have access to electronic support through My OracleSupport. For information, visit http://www.oracle.com/pls/topic/lookup?ctx=acc&id=info or visit http://www.oracle.com/pls/topic/lookup?ctx=acc&id=trs if you are hearing impaired.

Sample Code

Oracle may provide sample code in SuiteAnswers, the Help Center, User Guides, or elsewhere throughhelp links. All such sample code is provided "as is” and “as available”, for use only with an authorizedNetSuite Service account, and is made available as a SuiteCloud Technology subject to the SuiteCloudTerms of Service at www.netsuite.com/tos.

Oracle may modify or remove sample code at any time without notice.

No Excessive Use of the Service

As the Service is a multi-tenant service offering on shared databases, Customer may not use the Servicein excess of limits or thresholds that Oracle considers commercially reasonable for the Service. If Oraclereasonably concludes that a Customer’s use is excessive and/or will cause immediate or ongoingperformance issues for one or more of Oracle’s other customers, Oracle may slow down or throttleCustomer’s excess use until such time that Customer’s use stays within reasonable limits. If Customer’sparticular usage pattern requires a higher limit or threshold, then the Customer should procure asubscription to the Service that accommodates a higher limit and/or threshold that more effectively alignswith the Customer’s actual usage pattern.

Beta Features

This software and related documentation are provided under a license agreement containing restrictionson use and disclosure and are protected by intellectual property laws. Except as expressly permittedin your license agreement or allowed by law, you may not use, copy, reproduce, translate, broadcast,modify, license, transmit, distribute, exhibit, perform, publish, or display any part, in any form, or by anymeans. Reverse engineering, disassembly, or decompilation of this software, unless required by law forinteroperability, is prohibited.

The information contained herein is subject to change without notice and is not warranted to be error-free. If you find any errors, please report them to us in writing.

If this is software or related documentation that is delivered to the U.S. Government or anyone licensing iton behalf of the U.S. Government, then the following notice is applicable:

U.S. GOVERNMENT END USERS: Oracle programs (including any operating system, integrated software,any programs embedded, installed or activated on delivered hardware, and modifications of suchprograms) and Oracle computer documentation or other Oracle data delivered to or accessed byU.S. Government end users are "commercial computer software" or “commercial computer softwaredocumentation” pursuant to the applicable Federal Acquisition Regulation and agency-specificsupplemental regulations. As such, the use, reproduction, duplication, release, display, disclosure,modification, preparation of derivative works, and/or adaptation of i) Oracle programs (including any

Page 4: SuiteCloud CLI for Java - Oracle · 2020. 3. 19. · Customer’s excess use until such time that Customer’s use stays within reasonable limits. ... data, incomplete data, re-run

operating system, integrated software, any programs embedded, installed or activated on deliveredhardware, and modifications of such programs), ii) Oracle computer documentation and/or iii) otherOracle data, is subject to the rights and limitations specified in the license contained in the applicablecontract. The terms governing the U.S. Government’s use of Oracle cloud services are defined by theapplicable contract for such services. No other rights are granted to the U.S. Government.

This software or hardware is developed for general use in a variety of information managementapplications. It is not developed or intended for use in any inherently dangerous applications, includingapplications that may create a risk of personal injury. If you use this software or hardware in dangerousapplications, then you shall be responsible to take all appropriate fail-safe, backup, redundancy, and othermeasures to ensure its safe use. Oracle Corporation and its affiliates disclaim any liability for any damagescaused by use of this software or hardware in dangerous applications.

Oracle and Java are registered trademarks of Oracle and/or its affiliates. Other names may be trademarksof their respective owners.

Intel and Intel Inside are trademarks or registered trademarks of Intel Corporation. All SPARC trademarksare used under license and are trademarks or registered trademarks of SPARC International, Inc. AMD,Epyc, and the AMD logo are trademarks or registered trademarks of Advanced Micro Devices. UNIX is aregistered trademark of The Open Group.

This software or hardware and documentation may provide access to or information about content,products, and services from third parties. Oracle Corporation and its affiliates are not responsible for andexpressly disclaim all warranties of any kind with respect to third-party content, products, and servicesunless otherwise set forth in an applicable agreement between you and Oracle. Oracle Corporation andits affiliates will not be responsible for any loss, costs, or damages incurred due to your access to or useof third-party content, products, or services, except as set forth in an applicable agreement between youand Oracle.

This documentation is in pre-General Availability status and is intended for demonstration and preliminaryuse only. It may not be specific to the hardware on which you are using the software. Oracle Corporationand its affiliates are not responsible for and expressly disclaim all warranties of any kind with respect tothis documentation and will not be responsible for any loss, costs, or damages incurred due to the use ofthis documentation.

The information contained in this document is for informational sharing purposes only and should beconsidered in your capacity as a customer advisory board member or pursuant to your pre-GeneralAvailability trial agreement only. It is not a commitment to deliver any material, code, or functionality, andshould not be relied upon in making purchasing decisions. The development, release, and timing of anyfeatures or functionality described in this document remains at the sole discretion of Oracle.

This document in any form, software or printed matter, contains proprietary information that is theexclusive property of Oracle. Your access to and use of this confidential material is subject to the termsand conditions of your Oracle Master Agreement, Oracle License and Services Agreement, OraclePartnerNetwork Agreement, Oracle distribution agreement, or other license agreement which hasbeen executed by you and Oracle and with which you agree to comply. This document and informationcontained herein may not be disclosed, copied, reproduced, or distributed to anyone outside Oraclewithout prior written consent of Oracle. This document is not part of your license agreement nor can it beincorporated into any contractual agreement with Oracle or its subsidiaries or affiliates.

Send Us Your FeedbackWe'd like to hear your feedback on this document.

Answering the following questions will help us improve our help content:

■ Did you find the information you needed? If not, what was missing?

Page 5: SuiteCloud CLI for Java - Oracle · 2020. 3. 19. · Customer’s excess use until such time that Customer’s use stays within reasonable limits. ... data, incomplete data, re-run

■ Did you find any errors?

■ Is the information clear?

■ Are the examples correct?

■ Do you need more examples?

■ What did you like most about this document?

Click here to send us your comments. If possible, please provide a page number or section title to identifythe content you're describing.

To report software issues, contact NetSuite Customer Support.

Page 6: SuiteCloud CLI for Java - Oracle · 2020. 3. 19. · Customer’s excess use until such time that Customer’s use stays within reasonable limits. ... data, incomplete data, re-run

Table of ContentsCLI for Java Guide . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1

CLI for Java Installation Prerequisites . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1Installing CLI for Java . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1Token-based Authentication in CLI for Java . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2

CLI for Java Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4CLI for Java Commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4

adddependencies . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5authenticate . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7createproject . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8deploy . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9importbundle . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11importconfiguration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12importfiles . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12importobjects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13listbundles . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15listconfiguration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16listfiles . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16listmissingdependencies . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17listobjects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18manageauth . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19package . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20preview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21project . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22update . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23updatecustomrecordwithinstances . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24uploadfiles . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24uploadfolders . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25validate . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26

Page 7: SuiteCloud CLI for Java - Oracle · 2020. 3. 19. · Customer’s excess use until such time that Customer’s use stays within reasonable limits. ... data, incomplete data, re-run

CLI for Java Guide 1

CLI for Java GuideSuiteCloud Command Line Interface for Java (SuiteCloud CLI for Java) is a tool that can be used with yourown integrated development environment (IDE) to develop SDF projects. You can also create batch andshell scripts that use CLI commands to automate SDF project validation and deployment processes. CLIfor Java is part of the SuiteCloud Software Development Kit (SuiteCloud SDK).

Note: CLI for Java is intended for experienced SDF users and users who are already familiar withSuiteCloud IDE plug-ins. Oracle recommends using SuiteCloud IDE plug-ins to develop your firstproject and to learn more about SDF before trying CLI for Java. For more information, see the helptopics Getting Started with SuiteCloud Development Framework and SuiteCloud DevelopmentFramework Tutorial.

The following topics provide instructions to install and use CLI for Java:

■ CLI for Java Installation Prerequisites■ Installing CLI for Java■ Token-based Authentication in CLI for Java

CLI for Java Installation PrerequisitesVerify the following prerequisites before you install use CLI for Java:

■ File extractor software — File extractor software is required to extract the contents of the installationpackage.

■ Java Runtime Environment (JRE) — CLI for Java requires Java SE Development Kit version 11.■ NetSuite account features — An account administrator must enable the features in your account

that SDF depends on. See the help topic Enabling SuiteCloud Development Framework in YourNetSuite Account (Admin Only).

■ NetSuite permissions — An account administrator must create and assign the SDF Developer role toyour account. See the help topic Assigning the Developer Role (Admin Only).

■ Operating system — CLI for Java supports the following operating systems:□ Windows□ Linux□ Mac OS

Installing CLI for JavaTo install CLI for Java, extract the installation package so that you can then execute CLI using Java.

Important: When your account is upgraded, your instance of CLI for Java does not get updatedautomatically. After your Account upgrade, you must manually update CLI for Java to match theversion of your Account. You may experience errors related to compatibility by using an olderversion of CLI for Java with the latest version of NetSuite.

To install CLI for Java:

1. Create a directory where you want to install CLI for Java, such as C:\javacli\ for Windows, or /javacli/for Linux and Mac OS X.

SuiteCloud CLI for Java

Page 8: SuiteCloud CLI for Java - Oracle · 2020. 3. 19. · Customer’s excess use until such time that Customer’s use stays within reasonable limits. ... data, incomplete data, re-run

Installing CLI for Java 2

2. Adjust your PATH system environment variable to include the CLI for Java directory. By doing this,you are enabling the use of CLI for Java from any folder in your machine.■ Select Control Panel > System > Advanced system settings.■ Click Environment Variables...■ Under System variable, select the PATH variable, and click Edit...■ Click New, enter the CLI for Java directory path, and click OK.■ In the Environment Variables window, click OK. Then, in the System Properties window, click

Apply, and then OK.3. Download CLI for Java and extract the contents of one of the following packages to the CLI for Java

directory:If your account runs on 2020.2, use one of the following links:■ Windows: https://system.netsuite.com/download/suitecloud-sdk/cli/java/latest/sdf-cli.zip

Note: Use this link to get the latest changes every time the CLI for Java is updated.

■ Linux and Mac: https://system.netsuite.com/download/suitecloud-sdk/cli/java/latest/sdf-cli.tar.gz

Note: Use this link to get the latest changes every time the CLI for Java is updated.

If your account runs on 2020.1, use one of the following links:■ Windows: https://system.netsuite.com/download/suitecloud-sdk/cli/java/20.1/sdf-cli.zip■ Linux and Mac: https://system.netsuite.com/download/suitecloud-sdk/cli/java/20.1/sdf-cli.tar.gz

Note: The packages contain the JAR file and either the CLI for Java bash or batch script,depending on the operating system.

You can now use CLI for Java by running the sdfcli command.4. For Linux and Mac OS X computers, make the sdfcli bash file executable by running the following

command from the CLI for Java directory:

chmod +x sdfcli

You can now use CLI for Java by running the sdfcli command.

Note: You must have read, write, and execute access on any directory where you want torun CLI for Java.

Token-based Authentication in CLI for JavaToken-based authentication (TBA) can be used with NetSuite roles to run CLI for Java commands withoutbeing prompted for account passwords. By using TBA with CLI for Java, you can create batch andshell scripts to automate SDF project validation and deployment processes. Additionally, TBA providesincreased development environment security, and fewer session terminations when using a single loginto develop SDF projects and navigate NetSuite. For more information about setting up TBA with youraccount, see the help topic Getting Started with Token-based Authentication.

When your account and role are set up for TBA, you can either issue a token from NetSuite or CLI for Java.Depending on your preferences, see one of the following sections:

■ Tokens Issued in NetSuite

SuiteCloud CLI for Java

Page 9: SuiteCloud CLI for Java - Oracle · 2020. 3. 19. · Customer’s excess use until such time that Customer’s use stays within reasonable limits. ... data, incomplete data, re-run

Token-based Authentication in CLI for Java 3

■ Tokens Issued in CLI for Java

Important: If your role has the 2FA feature enabled, you need to issue tokens in NetSuite. Formore information, see the help topic Manage TBA Tokens in the NetSuite UI.

Tokens Issued in NetSuiteIf you already issued a token in NetSuite and want to use it to log in to your account, you can use thesavetoken option from the authenticate command. To revoke it, you can use the revoketoken option inthe manageauth command, or go to NetSuite. For more information, see:

■ authenticate

■ manageauth

■ Manage TBA Tokens in the NetSuite UI

Tokens Issued in CLI for JavaIf you have not issued a token for your account in NetSuite yet, you can issue it directly in CLI for Java. Theauthenticate command creates a TBA token in your account for use with CLI for Java. In case you need torevoke a token, you can use the revoketoken option in the manageauth command.

■ authenticate

■ manageauth

■ Manage TBA Tokens in the NetSuite UI

Important: TBA tokens can be assigned to multiple accounts, users, and roles, but youcan only have one TBA token per account-user-role combination. For example, assume thatyou issued three TBA tokens for an account named WolfeElectronics with a role named SDFDeveloper that is assigned to a user named [email protected]. In this scenario, [email protected] user can only use the latest-issued TBA token with CLI for Java to login to the WolfeElectronics account. The first two TBA tokens should be manually removed from theaccount using the NetSuite interface if they were not formally revoked before issuing the latesttoken.

SuiteCloud CLI for Java

Page 10: SuiteCloud CLI for Java - Oracle · 2020. 3. 19. · Customer’s excess use until such time that Customer’s use stays within reasonable limits. ... data, incomplete data, re-run

CLI for Java Reference 4

CLI for Java ReferenceCLI for Java Commands

CLI for Java CommandsYou can use CLI for Java to manage SDF project components and validate and deploy projects to yourNetSuite account.

Note: CLI for Java is intended for experienced SDF users and users who are already familiar withSuiteCloud IDE plug-in. It is recommended that you use SuiteCloud IDE plug-in to develop yourfirst project and to learn more about SDF before trying CLI for Java. For more information, see thehelp topics Getting Started with SuiteCloud Development Framework and SuiteCloud DevelopmentFramework Tutorial.

CLI for Java always prompts you to enter your account password unless you log in with token-basedauthentication.

Syntaxsdfcli <command> <option> <argument>

Important: If an argument is enclosed in angle brackets in the CLI, i.e. <argument>, it meansthat it is mandatory. Otherwise, if an argument is enclosed in brackets, i.e. [argument], it meansthat it is optional.

Command Reference

Command Description

adddependencies Adds missing dependencies to the manifest file.

authenticate Grants authorization for SuiteCloud SDK to access NetSuite with an account-role combination.

createproject Creates an SDF project.

deploy Deploys the folder or zip file that contains the SDF project.

importbundle Imports a customization bundle from your NetSuite account and converts itto an account customization project.

importconfiguration Imports the feature configuration from your NetSuite account to the accountcustomization project so that you can enable or disable features in theproject.

importfiles Imports files from your NetSuite account to the account customizationproject.

importobjects Imports custom objects from your NetSuite account to the SDF project.

listbundles Lists the customization bundles that were created in your NetSuite account.

SuiteCloud CLI for Java

Page 11: SuiteCloud CLI for Java - Oracle · 2020. 3. 19. · Customer’s excess use until such time that Customer’s use stays within reasonable limits. ... data, incomplete data, re-run

CLI for Java Commands 5

listconfiguration Lists the configuration types that are available in your NetSuite account.

listfiles Lists the files in the File Cabinet of your NetSuite account.

listmissingdependencies Lists the missing dependencies in the SDF project.

listobjects Lists the custom objects in your NetSuite account.

manageauth Manages authentication IDs (authid) for all your projects.

package Generates a ZIP file from your project.

preview Previews the deployment steps of a folder or zip file that contains the SDFproject.

project Sets the default project folder or zip file for CLI for Java.

update Updates existing custom objects in the SDF project folder with the customobjects in your NetSuite account.

updatecustomrecordwithinstances Updates the custom record object and its instances in the SDF project.

uploadfiles Uploads one or several files from an SDF project to the File Cabinet in youraccount .

uploadfolders Uploads all the files within one or several folders from an SDF project to theFile Cabinet in your account.

validate Validates the folder or zip file that contains the SDF project.

adddependenciesAdds missing dependencies to the manifest file.

Syntax

adddependencies [-authid myNetSuiteDevRole] [-p FolderOrZipFile] [-all] [-feature FeatureName1:{optional|required} [FeatureName2:{optional|required}] [...]] [-file File1 [File2] [...]] [-object "appid=<appid>,scriptid=<scriptid1>" "scriptid=<scriptid2>" "[Script3]" [...]]

Options

Option Required / Optional Description

-authid Optional

If you do not specify it, the default account isused.

References the custom alias you gave to a specificaccount-role combination.

-p Required when a default project has not beenspecified by the project command or when youwant to specify a project other than the default.For more information, see project.

References the folder or zip file that contains the SDFproject.

-all Optional Adds all missing dependencies to the SDF project.

SuiteCloud CLI for Java

Page 12: SuiteCloud CLI for Java - Oracle · 2020. 3. 19. · Customer’s excess use until such time that Customer’s use stays within reasonable limits. ... data, incomplete data, re-run

CLI for Java Commands 6

When specified, ensure that you do not use the -feature, -file, and -object options.

-feature Optional Specifies the feature dependency references to addto the SDF project.

Each reference is a name:value pair delimited by aspace. For example:

CUSTOMRECORD:required ACCOUNTING:optional

When specified, ensure that you do not use the -alloption.

-file Optional Specifies the files to add to the SDF project.

When specified, ensure that you do not use the -alloption.

-object Optional Specifies the objects to add to the SDF project.

When specified, ensure that you do not use the -alloption.

Two object reference formats are supported.

The recommended format consists of attribute=valuepairs. For example, the following is a customobject reference to an object with a script ID ofcustobject_sample:

"scriptid=custobject_sample"

For SuiteApp projects, the attribute=value pair formatis required. It must include script ID and applicationID delimited by a comma.

For example:

"appid=com.netsuite.test01,scriptid=customrecordcrt01" "scriptid=customrecordcrt02"

-h or -help Optional Print the help for this command.

ExampleThe following command updates the manifest file of an SDF project. The command adds dependencies onthe CUSTOMRECORD feature, a file, and an object.

sdfcli adddependencies -authid myDevRole -p c:/project/ -feature CUSTOMRECORD:required -file /js/test.js -object "scriptid=custobject_sample"

When executed, the command prompts you to update the manifest file and produces output that issimilar to the following:

SuiteCloud Development Framework CLI (com.netsuite.ide.core_2020.2.0)Manifest file will be updated to add the dependencies, do you want to continue?Type YES to update the manifest file.YESDone.

SuiteCloud CLI for Java

Page 13: SuiteCloud CLI for Java - Oracle · 2020. 3. 19. · Customer’s excess use until such time that Customer’s use stays within reasonable limits. ... data, incomplete data, re-run

CLI for Java Commands 7

authenticateImportant: Browser-based authentication is not compatible with Windows Subsystem forLinux.

Grants authorization for SuiteCloud SDK to access NetSuite with an account-role combination. When yourun this command in CLI for Java, a browser prompts so that you can log in to the role you want to use inthe tool. Once the browser is open, you can issue a TBA token in NetSuite and it gets saved to use in theCLI for Java.

Important: In order for this command to work, at least one of the following ports needs to beaccessible locally from your machine: 52300 - 52315.

Syntax

authenticate [-account AccountID] [-url NetSuiteDomainURL] [-authid myNetSuiteDevRole]

Options

Option Required / Optional Description

-account Optional

Required if the -savetokenoption is specified.

References the ID of the account to log in to.

-authid Optional

If you do not specify it, thedefault account is used.

References the custom alias you gave to a specific account-rolecombination.

If you do not have an authentication ID (authid) for a specific account-role combination, you create it by passing it as an option and giving it acustom name.

-savetoken Optional Enter a TBA token that you issued previously in NetSuite.

-tokenid Required if the -savetokenoption is specified.

Enter the token ID of a TBA token you issued previously in NetSuite.

-tokensecret Required if the -savetokenoption is specified.

Enter the token secret of a TBA token you issued previously inNetSuite.

-url Optional References the URL used to access the account.

If it is not specified, the production URL is used. That is, a URL such as“system.netsuite.com”.

-h or -help Optional Print the help for this command.

ExampleThe following command authenticates an account by prompting the browser:

sdfcli authenticate -authid myDevAccount

SuiteCloud CLI for Java

Page 14: SuiteCloud CLI for Java - Oracle · 2020. 3. 19. · Customer’s excess use until such time that Customer’s use stays within reasonable limits. ... data, incomplete data, re-run

CLI for Java Commands 8

After the browser closes and the account-role combination is authenticated, the command producesoutput that is similar to the following:

Authenticating...The TBA token was successfully saved.

createprojectCreates an SDF project, either an account customization project (ACP) or a SuiteApp project.

Syntax

createproject [-overwrite] -type AccountType -parentdirectory FolderPath -projectname ProjectName [-projectid ProjectID] [-publisherid PublisherID] [-projectversion ProjectVersion]

Options

Option Required /Optional

Description

-type Required The project type. Valid values are ACCOUNTCUSTOMIZATION or SUITEAPP.

-overwrite Optional Indicates that an existing project with an identical project name can beoverwritten.

-parentdirectory Required Sets the parent directory of the project created.

For example:

c:/Users/myUserName/Desktop/NetSuiteCustomizations

Note: You must have read, write, and execute access on anydirectory where you want to run CLI.

-projectname Required A name for your project.

-projectid Required whentype is specified asSUITEAPP

A unique identifier to assign to the project.

This value must be a word with lowercase alphanumeric characters. It mustbe less than 40 characters

-publisherid Required whentype is specified asSUITEAPP

The publisher ID of your SuiteApp project.

-projectversion Required whentype is specified asSUITEAPP

The version to assign to your project, using semantic versioning. Forexample, specify the following project version if your SDF SuiteApp isversion 1.02, minor revision #01242017:

1.02.01242016

SuiteCloud CLI for Java

Page 15: SuiteCloud CLI for Java - Oracle · 2020. 3. 19. · Customer’s excess use until such time that Customer’s use stays within reasonable limits. ... data, incomplete data, re-run

CLI for Java Commands 9

Important: After you deploy the SDF SuiteApp to yourNetSuite account, the project version number cannot be modified.The project version number of all subsequent deployments of theSDF SuiteApp must match the project version number of the initialdeployment.

-h or -help Optional Print the help for this command.

ExampleThe following command creates an account customization project:

sdfcli createproject [-overwrite] -type ACCOUNTCUSTOMIZATION -parentdirectory d:/myprojects/customizations -projectname MySDFProject

The following command creates a SuiteApp project:

sdfcli createproject [-overwrite] -type SUITEAPP -parentdirectory d:/sdfprojects/mysuiteapps -projectid mysuiteapp123 -projectname MySDFProject2 -publisherid com.netsuite -projectversion 1.0.0

deployDeploys the folder or zip file that contains the SDF project.

The SDF project folder is compressed into a ZIP file before it is deployed. Only the files and foldersreferenced in the deploy.xml file are included in the ZIP file that is deployed.

Important: For installation script, installation preference, and translation collection objects,files referenced within their xml structure are also deployed. Even if these files are not part of thedeploy.xml file.

Syntax

deploy [-authid myNetSuiteDevRole] [-p FolderOrZipFile] [-applycontentprotection (T|F)] [-l LogPathOrFile] [-np] [-v] [-sw] [-accountspecificvalues (WARNING|ERROR)]

Options

Option Required / Optional Description

-authid Optional

If you do not specify it, the defaultaccount is used.

References the custom alias you gave to aspecific account-role combination.

-p Required when a default project hasnot been specified by the project

References the folder or zip file that containsthe SDF project.

SuiteCloud CLI for Java

Page 16: SuiteCloud CLI for Java - Oracle · 2020. 3. 19. · Customer’s excess use until such time that Customer’s use stays within reasonable limits. ... data, incomplete data, re-run

CLI for Java Commands 10

command or when you want to specify aproject other than the default. For moreinformation, see project.

-applycontentprotection Required when locking.xmlor hiding.xml exists in theInstallationPreferences folder of aSuiteApp project.

Indicates whether content protection shouldbe applied.

For more information, see the help topicInstallation Preferences in a SuiteApp Project

-accountspecificvalues Optional Indicates how to handle the presenceof account-specific values in an accountcustomization project.

If the argument value is WARNING andthere are account-specific values in theproject, a warning message is thrown but thedeployment can continue.

If the argument value is ERROR and there areaccount-specific values in the project, anderror message is thrown and deploymentstops.

For more information, see the help topicAccount-Specific Values.

Important: If the —accountspecificvalues option is notspecified, the behavior is the same aspassing ERROR as an argument.

-l Optional Specifies the deployment log file location as adirectory path or a file name.

If you specify a directory, the log file isgenerated in the specified location by default.

Deployment log details are appended to theend of the file.

-np Optional Skips the preview step.

-v Optional Starts client-side project validation.

The deployment stops when any errors occurduring this process.

-sw Optional Removes the warning prompted beforedeploying to a production account.

-h or -help Optional Print the help for this command.

ExampleThe following command deploys an SDF project to an account and creates a log of the deploymentprocess:

sdfcli deploy -authid myDevRole -p c:/project/ -l d:/path/test.log -np -v

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

SuiteCloud CLI for Java

Page 17: SuiteCloud CLI for Java - Oracle · 2020. 3. 19. · Customer’s excess use until such time that Customer’s use stays within reasonable limits. ... data, incomplete data, re-run

CLI for Java Commands 11

SuiteCloud Development Framework CLI (com.netsuite.ide.core_2020.2.0)Enter password: Deploy "c:\project".2020-08-02 11:08:23 (PST) Installation startedInfo -- Account [(PRODUCTION) Wolfe Electronics]Info -- Account Customization Project [Project]Info -- Framework Version [1.0]Validate manifest -- SuccessValidate deploy file -- SuccessValidate configuration -- SuccessValidate script file -- SuccessValidate objects -- SuccessValidate resource files -- SuccessValidate account settings -- SuccessBegin deployment2020-08-02 11:08:23 (PST) Installation COMPLETE (0 minutes 1 second)

Writing to log file d:\path\test.log.

importbundleImports a customization bundle from your NetSuite account and converts it to an account customizationproject.

Syntax

importbundle -bundleid BundleID [-authid myNetSuiteDevRole] [-p FolderOrZipFile]

Options

Option Required / Optional Description

-bundleid Required Specifies the ID of the bundle toimport.

-authid Optional

If you do not specify it, the default account is used.

References the custom alias you gaveto a specific account-role combination.

-p Required when a default project has not been specified by theproject command or when you want to specify a project otherthan the default. For more information, see project.

References the folder or zip file thatcontains the SDF project.

-h or -help Optional Print the help for this command.

ExampleThe following command imports a bundle and creates an account customization project:

sdfcli importbundle -bundleid 123 -auhtid myDevRole -p c:/SDFproject

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

SuiteCloud Development Framework CLI (com.netsuite.ide.core_2020.2.0)Existing files will be overwritten, do you want to continue? Type YES to continue.YES

SuiteCloud CLI for Java

Page 18: SuiteCloud CLI for Java - Oracle · 2020. 3. 19. · Customer’s excess use until such time that Customer’s use stays within reasonable limits. ... data, incomplete data, re-run

CLI for Java Commands 12

Importing bundle with id 123 to path: "C:\project".The following bundle component(s) were imported.Objects\customlist_sample_cust_list_1.xml

importconfigurationImports the feature configuration from your NetSuite account to the account customization project sothat you can enable or disable features in the project.

Syntax

importconfiguration -configurationid ConfigID [-authid myNetSuiteDevRole] [-p FolderOrZipFile]

Options

Option Required / Optional Description

-configurationid Required Specifies the configuration to import.

This value should be set toFEATURES:ALL_FEATURES. You can only import theconfiguration for all features.

-authid Optional

If you do not specify it, the default account isused.

References the custom alias you gave to a specificaccount-role combination.

-p Required when a default project has notbeen specified by the project command orwhen you want to specify a project otherthan the default. For more information, seeproject.

References the folder or zip file that contains theSDF project.

-h or -help Optional Print the help for this command.

ExampleThe following command imports the feature configuration from your NetSuite account to an accountcustomization project:

sdfcli importconfiguration -configurationid FEATURES:ALL_FEATURES -authid myDevRole -p c:/SDFproject

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

SuiteCloud Development Framework CLI (com.netsuite.ide.core_2020.2.0)The following objects were imported successfully:FEATURES:ALL_FEATURES

importfilesImports files from your NetSuite account to the account customization project.

SuiteCloud CLI for Java

Page 19: SuiteCloud CLI for Java - Oracle · 2020. 3. 19. · Customer’s excess use until such time that Customer’s use stays within reasonable limits. ... data, incomplete data, re-run

CLI for Java Commands 13

Syntax

importfiles -paths FileCabinetPath1 [FilePathCabinet2] [...] [-authid myNetSuiteDevRole] [-p FolderOrZipFile] [-excludeproperties]

Options

Option Required / Optional Description

-paths Required Specifies the File Cabinet path or paths thatcontain the files to import.

Important: Wildcards are notallowed.

-authid Optional

If you do not specify it, the default accountis used.

References the custom alias you gave to a specificaccount-role combination.

-p Required when a default project has notbeen specified by the project command orwhen you want to specify a project otherthan the default. For more information,see project.

References the folder or zip file that contains theSDF project.

-excludeproperties Optional Exclude the file and folder properties specified inyour NetSuite account. If you specify this option,the .attributes folder is not created.

-h or -help Optional Print the help for this command.

ExampleThe following command imports a file from a NetSuite account into a specified SDF project:

sdfcli importfiles -paths "/SuiteScripts/test.js" -authid myDevRole -p c:/project/

When executed, the command prompts you to overwrite any existing files in the SDF project andproduces output that is similar to the following:

SuiteCloud Development Framework CLI (com.netsuite.ide.core_2020.2.0)Existing files will be overwritten, do you want to continue? Type YES to continue.YESDone

importobjectsImport custom objects from an account to your SuiteCloud project. By default in account customizationprojects (ACP), if SuiteScript files are referenced in custom objects you import, these files are alsoimported.

SuiteCloud CLI for Java

Page 20: SuiteCloud CLI for Java - Oracle · 2020. 3. 19. · Customer’s excess use until such time that Customer’s use stays within reasonable limits. ... data, incomplete data, re-run

CLI for Java Commands 14

Syntax

importobjects <-destinationfolder DestinationPath> <-scriptid ScriptID1 [ScriptID2] [...]> <-type CustomObjectType> [-authid myNetSuiteDevRole] [-p FolderOrZipFile] [-appid QualifiedAppID]

Options

Option Required / Optional Description

-destinationfolder Required Indicates where custom objects are saved.

Specify a folder that is relative to the SDF project. Thisvalue must start with “/Objects”.

-scriptid Required Imports custom objects that are associated with thespecified scripts IDs.

-type Required Imports custom objects that are associated with thespecified custom script types.

Specify the ALL value to import custom objects of allcustom script types.

-authid Optional

If you do not specify it, the defaultaccount is used.

References the custom alias you gave to a specificaccount-role combination.

-p Required when a default project hasnot been specified by the projectcommand or when you want tospecify a project other than thedefault. For more information, seeproject.

References the folder or zip file that contains the SDFproject.

-appid Optional References the application ID of the SDF SuiteApp.

The application ID is a fully qualified name with thenotation: <publisherid>.<projectid>. For example,com.netsuite.mysuiteapp or org.mycompany.helloworldare valid app IDs.

When application ID is specified, only custom objectsthat are associated with the app ID are imported.Otherwise, only custom objects that are not associatedwith an app ID are imported.

For information about the SuiteApp application ID, seethe help topic SuiteApp Application ID.

-excludefiles Optional Indicates that the SuiteScript files referenced in customobjects are not imported. It can only be used in accountcustomization projects (ACP).

If this option is not specified, the SuiteScript filesreferenced in the imported custom objects are importedtoo.

-h or -help Optional Print the help for this command.

SuiteCloud CLI for Java

Page 21: SuiteCloud CLI for Java - Oracle · 2020. 3. 19. · Customer’s excess use until such time that Customer’s use stays within reasonable limits. ... data, incomplete data, re-run

CLI for Java Commands 15

ExampleThe following command imports two customrecordtype objects, customlist2 and customrole1009, into aproject.

sdfcli importobjects -destinationfolder "/Objects/subfolder" -scriptid customlist2 customrole1009 -type ALL -account 0000001 -p c:/project/ -authid MyDevRole -appid org.mycompany.helloworldapp

When executed, the command prompts you to overwrite any existing objects in the SDF project andproduces output that is similar to the following:

SuiteCloud Development Framework CLI (com.netsuite.ide.core_2020.2.0)Existing objects will be overwritten, do you want to continue? Type YES to continue.YESThe following objects were imported successfully:customlist:customlist2role:customrole1009

listbundlesLists the customization bundles that were created in your NetSuite account.

Syntax

listbundles [-authid myNetSuiteDevRole]

Options

Option Required / Optional Description

-authid Optional

If you do not specify it, the defaultaccount is used.

References the custom alias you give to a specific account-role combination.

-h or -help Optional Print the help for this command.

ExampleThe following command lists all the bundles in a NetSuite account:

sdfcli listbundles -authid myDevRole

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

SuiteCloud Development Framework CLI (com.netsuite.ide.core_2020.2.0)123455:My Test Bundle123456:Managed Bundle to Production

SuiteCloud CLI for Java

Page 22: SuiteCloud CLI for Java - Oracle · 2020. 3. 19. · Customer’s excess use until such time that Customer’s use stays within reasonable limits. ... data, incomplete data, re-run

CLI for Java Commands 16

listconfigurationLists the configuration types that you can import from your NetSuite account.

Syntax

listconfiguration [-authid myNetSuiteDevRole]

Options

Option Required / Optional Description

-authid Optional

If you do not specify it, the defaultaccount is used.

References the custom alias you give to a specific account-role combination.

-h or -help Optional Print the help for this command.

ExampleThe following command lists the configuration types that you can import from your account:

sdfcli listconfiguration -authid myDevRole

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

SuiteCloud Development Framework CLI (com.netsuite.ide.core_2020.2.0)FEATURES:ALL_FEATURES:Enable Features

listfilesLists the files in the File Cabinet of your NetSuite account.

Syntax

listfiles [-authid myNetSuiteDevRole] <-folder FileCabinetPath1 [FileCabinetPath2] [...]>

Options

Option Required / Optional Description

-folder Required Specifies the File Cabinet folder that contains the files to list.

In addition to the files in the folder, the files in anysubfolders are listed.

-authid Optional

If you do not specify it, the defaultaccount is used.

References the custom alias you give to a specific account-role combination.

SuiteCloud CLI for Java

Page 23: SuiteCloud CLI for Java - Oracle · 2020. 3. 19. · Customer’s excess use until such time that Customer’s use stays within reasonable limits. ... data, incomplete data, re-run

CLI for Java Commands 17

-h or -help Optional Print the help for this command.

ExampleThe following command lists the files in the File Cabinet of your NetSuite account:

sdfcli listfiles -folder "/SuiteScripts" -authid myDevRole

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

SuiteCloud Development Framework CLI (com.netsuite.ide.core_2020.2.0)/SuiteScripts/file1.js/SuiteScripts/file2.js/SuiteScripts/file3.js/SuiteScripts/file4.js/SuiteScripts/RunTimeFiles/document.pdf/SuiteScripts/RunTimeFiles/data.csv/SuiteScripts/RunTimeFiles/log.txt/SuiteScripts/RunTimeFiles/sample.txt/SuiteScripts/RunTimeFiles/test.xml

listmissingdependenciesLists the missing dependencies in the SDF project.

Syntax

listmissingdependencies [-authid myNetSuiteDevRole] [-l DependencyListFileName] [-p FolderOrZipFile]

Options

Option Required / Optional Description

-authid Optional

If you do not specify it, the default account is used.

References the custom alias you giveto a specific account-role combination.

-l Optional Specifies the missing dependency logfile location as a directory path or a filename.

If you specify a directory, the log file isgenerated in the specified location bydefault.

Missing dependency log details areappended to the end of the file.

-p Required when a default project has not been specified by theproject command or when you want to specify a project otherthan the default. For more information, see project.

References the folder or zip file thatcontains the SDF project.

-h or -help Optional Print the help for this command.

SuiteCloud CLI for Java

Page 24: SuiteCloud CLI for Java - Oracle · 2020. 3. 19. · Customer’s excess use until such time that Customer’s use stays within reasonable limits. ... data, incomplete data, re-run

CLI for Java Commands 18

ExampleThe following command lists the missing dependencies in an SDF project:

sdfcli listmissingdependencies -p c:/project/ -l test.log

The command specifies to output a list of missing dependencies for the project located in the directoryc:/project, and write the list to the file test.log.

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

SuiteCloud Development Framework CLI (com.netsuite.ide.core_2020.2.0)Unresolved dependencies:Feature - CUSTOMRECORDS:requiredObject - customsearch51 Writing to log file C:\sdfprojects\myproject\test.log.

The command output states that the feature CUSTOMRECORDS is required, therefore that feature mustbe enabled in the manifest. The object customsearch51 is a dependency that is missing from the project.To resolve the dependency, the customsearch51 object must be added to the project or referenced in themanifest. The command writes the list to test.log, located in the SDF CLI installation directory.

listobjectsLists the custom objects in your NetSuite account.

Syntax

listobjects [-authid myNetSuiteDevRole] [-p FolderOrZipFile] [-appid QualifiedAppID] [-scriptid ScriptID] [-type CustomObjectType1 [CustomObjectType2] [...]]

Options

Option Required / Optional Description

-authid Optional

If you do not specify it, the default accountis used.

References the custom alias you give to a specific account-role combination.

-p Required when a default project has notbeen specified by the project command orwhen you want to specify a project otherthan the default. For more information,see project.

References the folder or zip file that contains the SDFproject.

-appid Optional References the application ID of the SDF SuiteApp.

The application ID is a fully qualified name with thenotation: <publisherid>.<projectid>. For example,com.netsuite.mysuiteapp or org.mycompany.helloworld arevalid app IDs.

SuiteCloud CLI for Java

Page 25: SuiteCloud CLI for Java - Oracle · 2020. 3. 19. · Customer’s excess use until such time that Customer’s use stays within reasonable limits. ... data, incomplete data, re-run

CLI for Java Commands 19

When application ID is specified, only custom objects thatare associated with the app ID are listed. Otherwise, onlycustom objects that are not associated with an applicationID are listed.

For information about the SuiteApp application ID, see thehelp topic SuiteApp Application ID.

-scriptid Optional Lists the custom objects with script IDs that match orcontain the string value of the specified script ID.

If you specify this option with the -type option, the list ofcustom objects is also checked against the criteria set by the-type option.

If the -scriptid and -type options are not specified, all customobjects are listed.

-type Optional Lists the custom objects that are associated with thespecified custom NetSuite types.

If you specify this option with the -scriptid option, the list ofcustom objects is also checked against the criteria set by the-scriptid option.

If the -scriptid and -type options are not specified, all customobjects are listed.

-h or -help Optional Print the help for this command.

ExampleThe following command lists the custom objects in your NetSuite account:

sdfcli listobjects -authid myDevRole -p c:/project/ -appid org.mycompany.helloworldapp -scriptid 9 -type customlist role savedsearch

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

SuiteCloud Development Framework CLI (com.netsuite.ide.core_2020.2.0)customlist:customlist19customlist:customlist9role:customrole1009savedsearch:customsearch39savedsearch:customsearch49savedsearch:customsearch9

manageauthManages authentication IDs (authIDs) for all your projects.

Syntax

manageauth [-authid myNetSuiteDevRole -info] [-list] [-authid myNetSuiteDevRole -rename myOtherNetSuiteDevRole] [-authid myNetSuiteDevRole -remove]

SuiteCloud CLI for Java

Page 26: SuiteCloud CLI for Java - Oracle · 2020. 3. 19. · Customer’s excess use until such time that Customer’s use stays within reasonable limits. ... data, incomplete data, re-run

CLI for Java Commands 20

Options

Option Required / Optional Description

-info Optional Prints the following information for the specified authentication ID(authID): company name, role ID, and URL.

-list Optional Prints a list of all the configured authentication IDs (authIDs).

-remove Optional Remove an authentication ID (authID).

Usage: sdfcli manageauth -remove {authID}.

-rename Optional Rename an authentication ID (authID). You must specifiy ittogether with the renameto option.

Usage: sdfcli manageauth -rename {authID} -renameto{newauthID}.

-renameto Required when the -renameoption is specified.

Enter the new ID for an authentication ID (authID). You mustspecify it together with the -rename option.

Usage: sdfcli manageauth -rename {authID} -renameto{newauthID}.

-revoketoken Optional Revokes the TBA token that was issued to your account and islinked to the specified authentication ID (authID).

-h or -help Optional Print the help for this command.

ExampleWhen you run sdfcli manageauth -list, the command produces output that is similar to the following:

The following authentication IDs (authID) are available for your account:- myProductionAccount- myDevelopmentAccount- testingSandbox

packageGenerates a ZIP file from your project, respecting the structure specified in the deploy.xml file, andapplying local validation. You can run this command for both account customization and SuiteAppprojects.

Syntax

package [-destination destinationFolder] [-project projectFolder]

Options

Option Required / Optional Description

-d or -destination Required Specify a path to store the ZIP file containing your project.

SuiteCloud CLI for Java

Page 27: SuiteCloud CLI for Java - Oracle · 2020. 3. 19. · Customer’s excess use until such time that Customer’s use stays within reasonable limits. ... data, incomplete data, re-run

CLI for Java Commands 21

-p or -project Required Specifies the preview log file location as a directory path or a filename.

If you specify a directory, the log file is generated in the specifiedlocation by default.

Preview log details are appended to the end of the file.

-h or -help Optional Print the help for this command.

ExampleThe following command creates a ZIP file with an SDF project and stores it in a specific folder:

sdfcli package -d C:\sdfProjects -p C:\sdfProjects\projectACP

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

The projectACP-2020-08-17_14-50-23.zip file has been successfully created.

previewPreviews the deployment steps of a folder or zip file that contains the SDF project.

The SDF project is compressed into a zip file before previewing.

Syntax

preview [-authid myNetSuiteDevRole] [-p FolderOrZipFile] [-applycontentprotection (T|F)] [-l LogPathOrFile]

Options

Option Required / Optional Description

-authid Optional

If you do not specify it, the default account is used.

References the custom alias yougive to a specific account-rolecombination.

-p Required when a default project has not beenspecified by the project command or when you wantto specify a project other than the default. For moreinformation, see project.

References the folder or zip filethat contains the SDF project.

-applycontentprotection Required when locking.xml or hiding.xml exists in theInstallationPreferences folder of a SuiteApp project.

Indicates whether contentprotection should be applied.

For more information, seethe help topic InstallationPreferences in a SuiteAppProject

SuiteCloud CLI for Java

Page 28: SuiteCloud CLI for Java - Oracle · 2020. 3. 19. · Customer’s excess use until such time that Customer’s use stays within reasonable limits. ... data, incomplete data, re-run

CLI for Java Commands 22

-l Optional Specifies the preview log filelocation as a directory path or afile name.

If you specify a directory, the logfile is generated in the specifiedlocation by default.

Preview log details areappended to the end of the file.

-h or -help Optional Print the help for this command.

ExampleThe following command previews deployment steps for the SDF project and stores them in a log file:

sdfcli preview -authid myDevRole -p c:/project/ -l d:/path/test.log

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

SuiteCloud Development Framework CLI (com.netsuite.ide.core_2020.2.0)Preview "c:\project".Validate manifest -- SuccessValidate deploy file -- SuccessValidate configuration -- SuccessValidate script file -- SuccessValidate objects -- SuccessValidate resource files -- SuccessValidate account settings -- SuccessDeployment previewUpload file -- ~/FileCabinet/SuiteScripts/UserEventScript.js

projectSets the default project folder or zip file for CLI.

When you run this command without the -p option, the default project folder or zip file is displayed.

If a default project has been specified, you do not need to specify a project when using CLI commands.

Syntax

project [-p FolderOrZipFile]

Options

Option Required / Optional Description

-p Required whenspecifying a defaultproject.

Sets the default folder or zip file that contains the SDF project. Whenspecified, you do not need to specify the -p option in most other CLIcommands unless you want to reference a different project folder or zip file.

-h or -help Optional Print the help for this command.

SuiteCloud CLI for Java

Page 29: SuiteCloud CLI for Java - Oracle · 2020. 3. 19. · Customer’s excess use until such time that Customer’s use stays within reasonable limits. ... data, incomplete data, re-run

CLI for Java Commands 23

ExampleThe following command sets a default project based on a specified path:

sdfcli project -p c:/project/

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

SuiteCloud Development Framework CLI (com.netsuite.ide.core_2020.1.0)Default project folder set to c:\project.

updateUpdates existing custom objects in the SDF project folder with the custom objects in your NetSuiteaccount.

Syntax

update <-scriptid scriptID1 [scriptID2] [...]> [-authid myNetSuiteDevRole] [-p FolderOrZipFile]

Options

Option Required / Optional Description

-scriptid Required Lists the script IDs of custom objectsto update.

-authid Optional

If you do not specify it, the default account is used.

References the custom alias yougave to a specific account-rolecombination.

-p Required when a default project has not been specified by theproject command or when you want to specify a project otherthan the default. For more information, see project.

References the folder or zip file thatcontains the SDF project.

-h or -help Optional Print the help for this command.

ExampleThe following command checks for updates to a custom object in a NetSuite account, if it exists, andupdates the object in the SDF project:

sdfcli update -scriptid customrecord_test1 customrecord_test2 -authid myDevRole -p c:/project/

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

SuiteCloud Development Framework CLI (com.netsuite.ide.core_2020.2.0)customrecord_test1 updated.

SuiteCloud CLI for Java

Page 30: SuiteCloud CLI for Java - Oracle · 2020. 3. 19. · Customer’s excess use until such time that Customer’s use stays within reasonable limits. ... data, incomplete data, re-run

CLI for Java Commands 24

customrecord_test2 updated.

updatecustomrecordwithinstancesUpdates the custom record object and its instances.

Only the first 100 instances are updated based on their order of creation.

Syntax

updatecustomrecordwithinstances [-authid myNetSuiteDevRole] [-p FolderOrZipFile] <-scriptid ScriptID>

Options

Option Required / Optional Description

-scriptid Required The script ID of the custom recordobject.

The script ID must start with“customrecord”.

-authid Optional

If you do not specify it, the default account is used.

References the custom alias you gave toa specific account-role combination.

-p Required when a default project has not been specified bythe project command or when you want to specify a projectother than the default. For more information, see project.

References the folder or zip file thatcontains the SDF project.

-h or -help Optional Print the help for this command.

ExampleThe following command updates the custom record object and all instances of it, if they exist:

sdfcli updatecustomrecordwithinstances -scriptid customrecord10 -authid myDevRole -p c:/project

When executed, the command prompts you to overwrite any existing custom objects in the SDF projectand produces output that is similar to the following:

SuiteCloud Development Framework CLI (com.netsuite.ide.core_2020.2.0)Existing Custom Record will be overwritten, do you want to continue? Type YES to continue.YESCustom record "customrecord10" has been updated with custom record instances included.

uploadfilesUploads one or several files from an SDF project to the File Cabinet in your account. The folder containingthe files to upload is added to the account, if it did not already exist in the File Cabinet.

SuiteCloud CLI for Java

Page 31: SuiteCloud CLI for Java - Oracle · 2020. 3. 19. · Customer’s excess use until such time that Customer’s use stays within reasonable limits. ... data, incomplete data, re-run

CLI for Java Commands 25

Syntax

uploadfile [-authid myNetSuiteDevRole] [-project FolderOrZipFile] <-paths FilePath1 [FilePathCabinet2] [...]>

Options

Option Required / Optional Description

-paths Required Specifies the file path or paths that contain the files to upload.

To specify multiple paths, enter a space between paths andenclose the entire argument in double quotes. For example, "/SuiteScripts/myscripts/sample.js" "/SuiteScripts/morescripts/sample2.js"

Note: The path must start with a slash (/)character.

-authid Optional

If you do not specify it, the defaultaccount is used.

References the custom alias you gave to a specific account-role combination.

-project Required when a default project hasnot been specified by the projectcommand or when you want to specify aproject other than the default. For moreinformation, see project.

References the folder or zip file that contains the SDF project.

-h or -help Optional Print the help for this command.

ExampleThe following command uploads a file from an SDF project into an account:

sdfcli uploadfiles -paths "/SuiteScripts/test.js" -authid myDevRole -project c:/project/

uploadfoldersUploads all the files within one or several folders from a SDF project to the File Cabinet in your account.The folder is added to the account if it did not already exist in the File Cabinet.

The files under the specified folder, including its subfolders, are uploaded recursively.

Syntax

uploadfolders [-authid myNetSuiteDevRole] [-project FolderOrZipFile] <-paths FolderPath1 [FolderPathCabinet2] [...]>

SuiteCloud CLI for Java

Page 32: SuiteCloud CLI for Java - Oracle · 2020. 3. 19. · Customer’s excess use until such time that Customer’s use stays within reasonable limits. ... data, incomplete data, re-run

CLI for Java Commands 26

Options

Option Required / Optional Description

-paths Required Specifies the path or paths that contain the files toupload.

To specify multiple paths, enter a space betweenpaths and enclose the entire argument in doublequotes. For example, "/SuiteScripts" "/SuiteScripts/Test"

Note: The path must start with a forwardslash (/).

-authid Optional

If you do not specify it, the default account isused.

References the custom alias you gave to a specificaccount-role combination.

-project Required when a default project has not beenspecified by the project command or when youwant to specify a project other than the default.For more information, see project.

References the folder or zip file that contains the SDFproject.

-h or -help Optional Print the help for this command.

ExampleThe following command uploads a folder from an SDF project into an account:

sdfcli uploadfolder -paths "/SuiteScripts" -authid myDevRole -project c:/project/

validateValidates the folder or zip file that contains the SDF project.

Syntax

validate [-authid myNetSuiteDevRole] [-p FolderOrZipFile] [-applycontentprotection (T|F)] [-l LogFile] [-server] [-accountspecificvalues (WARNING|ERROR)]

Options

Option Required / Optional Description

-authid Optional References the custom alias yougave to a specific account-rolecombination.

SuiteCloud CLI for Java

Page 33: SuiteCloud CLI for Java - Oracle · 2020. 3. 19. · Customer’s excess use until such time that Customer’s use stays within reasonable limits. ... data, incomplete data, re-run

CLI for Java Commands 27

If you do not specify it, the default account isused.

-p Required when a default project has not beenspecified by the project command or when youwant to specify a project other than the default.For more information, see project.

References the folder or zip file thatcontains the SDF project.

-applycontentprotection Required when locking.xml or hiding.xmlexists in the InstallationPreferences folder of aSuiteApp project.

Indicates whether content protectionshould be applied.

For more information, see the helptopic Installation Preferences in aSuiteApp Project

-accountspecificvalues Optional Indicates how to handle the presenceof account-specific values in anaccount customization project. Thedefault value is ERROR.

If the argument value is WARNINGand there are account-specific valuesin the project, a warning message isthrown.

If the argument value is ERROR andthere are account-specific values inthe project, and error message isthrown.

For more information, see the helptopic Account-Specific Values.

-l Optional Specifies the validation log filelocation as a directory path or a filename.

If you specify a directory, the log file isgenerated in the specified location bydefault.

Validation log details are appended tothe end of the file.

-server Optional Indicates that validation should beperformed on the server. A passwordis required for validation

When not specified, client-sidevalidation is performed.

-h or -help Optional Print the help for this command.

Example #1The following command performs a server-side validation on a project folder:

sdfcli validate -authid myDevRole -p c:/project/ -l d:/path/test.log -server

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

SuiteCloud Development Framework CLI (com.netsuite.ide.core_2020.2.0)Validating using account (0000001).

SuiteCloud CLI for Java

Page 34: SuiteCloud CLI for Java - Oracle · 2020. 3. 19. · Customer’s excess use until such time that Customer’s use stays within reasonable limits. ... data, incomplete data, re-run

CLI for Java Commands 28

Validate manifest -- SuccessValidate deploy file -- SuccessValidate configuration -- SuccessValidate script file -- SuccessValidate objects -- SuccessValidate resource files -- SuccessValidate account settings -- Failed*** ERROR ***

Validation of account settings failed.

An error occurred during account settings validation.Details: The manifest contains a dependency on customrecord_tutorial object, but it is not in the account.

No errors found.Writing to log file C:\path\test.log.

Example #2The following command performs a client-side validation on a project folder:

sdfcli validate -authid myDevRole -p c:/project/ -l d:/path/test.log

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

SuiteCloud Development Framework CLI (com.netsuite.ide.core_2020.2.0)Validating using client-side SDF metadata.Updating SDF metadata.SDF metadata updated.Warnings for file c:\sdfprojects\SDFTutorialFromHelp\Objects\customrecord_tutorial.xml. - Line No. 13 - Error Message: The "enabledle" field depends on the "EXTREMELIST" feature. The manifest must define the "EXTREMELIST" feature as required or Optional - Line No. 15 - Error Message: The "enablemailmerge" field depends on the "MAILMERGE" feature. The manifest must define the "MAILMERGE" feature asrequired or OptionalWriting to log file C:\path\test.log.

SuiteCloud CLI for Java