task.checkStatus(options)

Note:

The content in this help topic pertains to SuiteScript 2.0.

Method Description

Returns a task status object associated with a specific task ID.

You can check the status of the following task types:

  • CSV import

  • Entity deduplication

  • Map/reduce script

  • Query

  • Record action

  • Scheduled script

  • Search

  • SuiteQL

  • Workflow trigger

Returns

task.CsvImportTaskStatus | task.EntityDeduplicationTaskStatus | task.MapReduceScriptTaskStatus | task.QueryTaskStatus | task.RecordActionTaskStatus | task.ScheduledScriptTaskStatus | task.SearchTaskStatus | task.SuiteQLTaskStatus | task.WorkflowTriggerTaskStatus

Supported Script Types

Server scripts

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

Governance

None

Module

N/task Module

Since

2015.2

Parameters

Note:

The options parameter is a JavaScript object.

Parameter

Type

Required / Optional

Description

options.taskId

string

required

Unique ID of the task to check the status of.

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 myTask = task.create({
    taskType: task.TaskType.QUERY
}); 

// Submit the task
var myTaskId = myTask.submit();

// Check the status
var myTaskStatus = task.checkStatus({
    taskId: myTaskId
});
...
// Add additional code 

          

Related Topics

N/task Module
SuiteScript 2.x Modules
SuiteScript 2.x

General Notices