Modules

filter

 

Objects/Functions

module (N/query)

SuiteScript 2.0

SuiteQL.run()

// Please search https://system.netsuite.com/app/help/helpcenter.nl?search=SuiteQL.run() for more information.

N/query Module
SuiteQL.run()
Method Description: Runs the SuiteQL query and returns the query results. You can use this method to run the SuiteQL query and obtain the results as a query.ResultSet object. If you want to run the SuiteQL query as a paged query, use SuiteQL.runPaged(options). Calling this method is equivalent to calling query.runSuiteQL(options) and passing the query.SuiteQL object as a parameter: If the SuiteAnalytics Connect feature is enabled in your NetSuite account, there is no limit to the number of results this method can return. If the SuiteAnalytics Connect feature is not enabled, this method can return a maximum of 100,000 results. For more information about SuiteAnalytics Connect, see SuiteAnalytics Connect. For more information and examples of using SuiteQL in the N/query module, see SuiteQL in the N/query Module. For more information about SuiteQL in general, see SuiteQL.
Returns: query.ResultSet
Supported Script Types: Client and server scripts For more information, see SuiteScript 2.0 Script Types.
Governance: 10 units
Module: N/query Module
Parent Object: query.SuiteQL
Sibling Object Members: SuiteQL Object Members
Since: 2020.1
Search NetSuite - https://system.netsuite.com/app/help/helpcenter.nl?search=SuiteQL.run()

Example:

// Code Example 1
// These two query calls return the same result set
var firstResultSet = mySuiteQLObject.run();
var secondResultSet = query.runSuiteQL(mySuiteQLObject);

// Code Example 2
// Add additional code
//...
// myQuery is an existing query.Query object
var mySuiteQLQuery = myQuery.toSuiteQL();

var results = mySuiteQLQuery.run();
//...
// Add additional code

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