importobjects

Imports SDF custom objects from your NetSuite account to your SuiteCloud project. By default in account customization projects (ACP), if SuiteScript files are referenced in the SDF custom objects you import, those files get imported too.

Syntax

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

        

Options

Option

Required / Optional

Description

-destinationfolder

Required

Indicates where SDF custom objects are saved.

Use a folder path that's relative to your SuiteCloud project. It has to start with /Objects.

-scriptid

Required

Imports the SDF custom objects that are associated with the specified scripts IDs.

-type

Required

Imports the SDF custom objects that are associated with the specified custom script types.

Use ALL to import SDF custom objects of all custom script types.

-authid

Required

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

-p

Required when a default project has not been specified by the project command or when you want to specify a project other than the default. For more information, see project.

References the folder or ZIP file with your SuiteCloud project.

-appid

Optional

References the application ID of the SDF SuiteApp.

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

If you specify an application ID, only SDF custom objects linked to that app ID are imported. Otherwise, only SDF custom objects not linked to an app ID are imported.

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

-excludefiles

Optional

Indicates that the SuiteScript files referenced in the SDF custom objects are not imported. This option 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 get imported too.

-h or -help

Optional

Prints the help for this command.

Example

Here's a command that imports two SDF custom objects, customlist2 and customrole1009, into a project.

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

When you run the command, it prompts you to overwrite any existing SDF custom objects in your SuiteCloud project and produces output that is similar to the following:

          SuiteCloud Development Framework CLI (com.netsuite.ide.core_2021.1.0)
Existing objects will be overwritten, do you want to continue? Type YES to continue.
YES
The following objects were imported successfully:
customlist:customlist2
role:customrole1009 

        

Related Topics

General Notices