Modules

filter

 

Objects/Functions

module (N/task)

SuiteScript 2.0

task.SuiteQLTask

// Please search https://system.netsuite.com/app/help/helpcenter.nl?search=task.SuiteQLTask for more information.

N/task Module
task.SuiteQLTask
Object Description: An asynchronous SuiteQL task. Use the methods and properties for this object to submit a SuiteQL task to the NetSuite task queue and execute it asynchronously. You can create a task.SuiteQLTask object using task.create(options). You can populate the properties of this object as you create it. With a task.SuiteQLTask object, you can do the following: Specify the SuiteQL query to submit using the SuiteQLTask.query property. This property accepts a string that represents a SuiteQL query. For more information, see SuiteQL. Provide parameters to use in the SuiteQL query using the SuiteQLTask.params property. Set the file ID or file path of a CSV file in the File Cabinet. SuiteQL query results are exported to this file. Use the SuiteQLTask.fileId property to specify a file ID, or use the SuiteQLTask.filePath property to specify a file path. Only one of these properties can be set at the same time. If both are set, an error occurs. Add dependent tasks to the SuiteQL task using SuiteQLTask.addInboundDependency(options). Dependent tasks are processed automatically when the SuiteQL task is complete. Submit the SuiteQL task to the task queue using SuiteQLTask.submit(). Get the status of a SuiteQL task using the properties of an associated task.SuiteQLTaskStatus object. The task.checkStatus(options) method returns a task.SuiteQLTaskStatus object when you specify a task ID that represents a SuiteQL task.
Supported Script Types: Server scripts For more information, see SuiteScript 2.0 Script Types.
Module: N/task Module
Methods and Properties: SuiteQLTask Object Members
Since: 2020.2
Search NetSuite - https://system.netsuite.com/app/help/helpcenter.nl?search=task.SuiteQLTask

Example:

// Code Example 1
// Add additional code
//...
var mySuiteQLTask = task.create({
taskType: task.TaskType.SUITE_QL
});
//...
// Add additional code

//SOURCE: https://system.netsuite.com/app/help/helpcenter.nl?fid=section_159223833809.html