Using SuiteQL with the N/query Module in SuiteScript

You can use SuiteQL to query your NetSuite data using the N/query module in SuiteScript. The following object and methods are available in the N/query module to work with SuiteQL:

Note:

If the SuiteAnalytics Connect feature is enabled in your NetSuite account, there is no limit to the number of results these methods can return. If the SuiteAnalytics Connect feature is not enabled, these methods can return a maximum of 100,000 results across all pages in the result set. For more information about SuiteAnalytics Connect, see SuiteAnalytics Connect.

Here is an example of how to load an existing query, convert it to SuiteQL, and run it:

          var myLoadedQuery = query.load({ id: 'custworkbook237'
}); var mySuiteQLQuery = myLoadedQuery.toSuiteQL();
var myResultSet = mySuiteQLQuery.run(); 

        

For more information, see SuiteQL in the N/query Module.

For a list of supported functions, see SuiteQL Supported and Unsupported Functions and SuiteQL Supported Built-in Functions.

Related Topics

General Notices