object:import
Imports SDF custom objects from your account to your SuiteCloud project. In Account Customization Projects (ACP), if SuiteScript files are referenced in the SDF custom objects you import, those files get imported by default too.
Syntax
object:import <--destinationfolder DestinationPath> <--scriptid ScriptID1 ScriptID2> <--type CustomObjectType> [--appid QualifiedAppID]
Options
Option |
Required / Optional |
Description |
---|---|---|
--appid |
Optional |
Specifies your application ID. If you specify it, 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 like 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, |
--excludefiles |
Optional |
Indicates that the SuiteScript files referenced in the SDF custom objects are not imported. You can only use this in Account Customization Projects (ACP). If you don't use this option, SuiteScript files referenced in the imported SDF custom objects get 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 non-interactive mode. |
--type |
Required |
Imports the SDF custom objects for the custom script types you specify. Specify the type of SDF custom objects to import. Enter To see which SDF custom objects are supported, see SuiteCloud Development Framework XML Reference. |
-h or --help |
Optional |
Prints the help for this command. |
Interactive Example
Here's a command that imports SDF custom objects from your account to the current project using interactive mode:
suitecloud object:import -i
Before you run the command, 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
Here's a command that imports two SDF custom objects, custtmpl_2
and custcentercategory_2
, into a project using non-interactive mode.
suitecloud object:import --destinationfolder "/Objects" --scriptid custtmpl_2 custcentercategory_2 --type ALL --appid org.mycompany.helloworldapp
Output Example
When you run the command, it produces an 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