task.SearchTask

Note:

The content in this help topic pertains to SuiteScript 2.0.

Object Description

The properties of a search task. Use the methods and properties for this object to submit a search task into the task queue, execute it asynchronously, and persist search results. Similar to SuiteAnalytics persisted search functionality, this capability is useful for searches across high volumes of data.

You can create a task.SearchTask object using task.create(options).

Use the task.SearchTask object to do the following:

Note:

There is a limit to the number of asynchronous searches running at the same time. The limit is set to be the same as the limit for CSV import. The file size limit is based on File Cabinet limits.

Supported Script Types

Server scripts

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

Module

N/task Module

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 searchTask = task.create({
    taskType: task.TaskType.SEARCH
});
searchTask.savedSearchId = 51;
var path = 'ExportFolder/export.csv';
searchTask.filePath = path;
var searchTaskId = searchTask.submit();
...
//Add additional code 

        

Related Topics

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

General Notices