query.ResultSet

Note:

The content in this help topic pertains to SuiteScript 2.0.

Object Description

The set of results returned by the query. Use Query.run() or Query.run.promise() to create this object.

The maximum number of results in a ResultSet object is 5000. If a query matches more than 5000 results, you must use Query.runPaged() or Query.runPaged.promise() to retrieve the full set of results.

Supported Script Types

Client and server scripts

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

Module

N/query Module

Methods and Properties

ResultSet Object Members

Since

2018.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/query Module Script Samples.

            // Add additional code
...
var myCustomerQuery = query.create({ type: query.Type.CUSTOMER
}); myCustomerQuery.columns = [ myCustomerQuery.createColumn({ fieldId: 'entityid' }), myCustomerQuery.createColumn({ fieldId: 'email' })
]; var resultSet = myCustomerQuery.run(); var results = resultSet.results;
for (var i = results.length - 1; i >= 0; i--) log.debug(results[i].values);
...
// Add additional code 

          

Related Topics

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

General Notices