task.SearchTaskStatus

Object Description

The status of an asynchronous search task (task.SearchTask) placed into the NetSuite task queue. To initiate the task and retrieve the task ID, use SearchTask.submit().

Important:

Ensure that you are familiar with script execution time limits when creating tasks. Each server script type is limited to an amount of time it can run on a single execution. For more information, see the time limit chart on Script Execution Time Limits.

Supported Script Types

Server scripts

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

Module

N/task Module

Methods and Properties

SearchTaskStatus Object Members

Since

2017.1

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 searchTaskStatus = task.checkStatus({
    taskId: 51
});

if (searchTaskStatus.status === task.TaskStatus.FAILED) { // Handle the task failure }
...
// Add additional code 

        

Related Topics

General Notices