QueryTask.filePath

Note:

The content in this help topic pertains to SuiteScript 2.0.

Property Description

Path of the CSV file to export query results to.

The CSV file must be located in the File Cabinet. You can provide a value for this property or the QueryTask.fileId property. Only one of these properties can be set at the same time. If both are set, an error occurs.

Type

string

Supported Script Types

Server scripts

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

Module

N/task Module

Parent Object

task.QueryTask

Sibling Object Members

QueryTask Object Members

Since

2020.2

Errors

Error Code

Thrown If

PROPERTY_VALUE_CONFLICT

You specified values for both QueryTask.fileId and QueryTask.filePath.

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 myQueryTask = task.create({
    taskType: task.TaskType.QUERY
});
myQueryTask.filePath = 'ExportFolder/export.csv';
...
// Add additional code 

          

Related Topics

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

General Notices