CsvImportTask.submit()

Method Description

Directs NetSuite to place a CSV import task into the NetSuite task queue and returns a unique ID for the task. Use CsvImportTaskStatus.status to view the status of a submitted task.

This method throws errors resulting from inline validation of CSV file data before the import of data begins (the same validation that is performed between the mapping step and the save step in the Import Assistant). Any errors that occur during the import job are recorded in the CSV response file, as they are for imports initiated through the Import Assistant.

Important:

You can use this method only in bundle installation scripts, scheduled scripts, and RESTlets.

Returns

string

Supported Script Types

Server scripts

For more information, see SuiteScript 2.x Script Types.

Governance

100 units

Module

N/task Module

Since

2015.2

Errors

Error Code

Message

Thrown If

FAILED_TO_SUBMIT_JOB_REQUEST_1

Failed to submit job request: {reason}

Task cannot be submitted.

Syntax
Important:

The following code sample shows the syntax for this member. It is not a functional example. For a complete script example, see N/task Module Script Samples.

          //Add additional code 
...
var csvImportTaskId = csvTask.submit();
...
//Add additional code 

        

Related Topics

General Notices