object:import

Imports SDF custom objects from an account to your SuiteCloud project. In Account Customization Projects (ACP), if SuiteScript files are referenced in the SDF custom objects you import, these files are also imported by default.

Syntax

            object:import <--destinationfolder DestinationPath> <--scriptid ScriptID1 ScriptID2> <--type CustomObjectType> [--appid QualifiedAppID] 

          

Options

Option

Required / Optional

Description

--appid

Optional

Specifies your application ID. If specified, only SDF custom objects with that application ID are imported. Otherwise, only SDF custom objects with no application ID are imported.

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

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

--destinationfolder

Required

Indicates where SDF custom objects are saved.

Specify the project folder where SDF custom objects are stored. It must be within the Objects folder of your project. For example, “/Objects/MyObjects”.

--excludefiles

Optional

Indicates that the SuiteScript files referenced in the SDF custom objects are not imported. It can only be used in Account Customization Projects (ACP).

If this option is not specified, the SuiteScript files referenced in the imported SDF custom objects are imported too.

-i or --interactive

Optional

Runs the command in interactive mode.

--scriptid

Required

Indicates the SDF custom objects that are imported to your project.

Specify the script ID. You can only import one file at a time in the non-interactive mode.

--type

Required

Imports the SDF custom objects that belong to the specified custom script types.

Specify the type of SDF custom objects to import. Enter All to import all SDF custom objects.

To see what SDF custom objects are supported by SDF, see SuiteCloud Development Framework XML Reference.

-h or --help

Optional

Prints the help for this command.

Interactive Example

The following command imports SDF custom objects from your account to the current project using the interactive mode:

            suitecloud object:import -i 

          

Before the command is executed, the following questions are prompted for a SuiteApp:

            Do you want to import objects from a specific SuiteApp? > Yes No
Enter the application ID. > org.mycompany.helloworldapp
Do you want to import all objects types? Yes > No
Select the object types you want to import. (*) Advanced PDF Template ( ) Center (*) Center Category
Do you want to enter a script ID to filter your search? Yes > No
Select the objects you want to import. ( ) advancedpdftemplate:custtmpl_myfile (*) advancedpdftemplate:custtmpl_2 ( ) centercategory:custcentercategory_myfile (*) centercategory:custcentercategory_2
Select the folder where you want to import the objects. > \Objects \Object\MyOtherObjects
All the objects in the project will be overwritten with the objects from the account. Do you want to continue? > Yes No 

          

Non-interactive Example

The following command imports two SDF custom objects, custtmpl_2 and custcentercategory_2, into a project using the non-interactive mode.

            suitecloud object:import --destinationfolder "/Objects" --scriptid custtmpl_2 custcentercategory_2 --type ALL --appid org.mycompany.helloworldapp 

          

Output Example

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

            The imported objects will overwrite the project objects.
The following objects have been imported:
    - advancedpdftemplate:custtmpl_2
    - centercategory:custcentercategory_2 

          

Related Topics

General Notices