NetSuite icon

NetSuite

Interact with NetSuite via REST API, SuiteQL, and Restlets using OAuth 2.0 Client Credentials

Actions11

SuiteQL → Execute

AI-generated

Summary

Execute a SuiteQL query against NetSuite to retrieve dataset records, either by selecting a predefined template query or by providing a custom SuiteQL statement.

Inputs

  • Query Template (required) — Choose a predefined SuiteQL template query (e.g., active customers, recent sales orders) or select 'Custom Query' to enter your own SuiteQL statement.
  • Query (required) — Provide a custom SuiteQL query string when 'Custom Query' is selected as the template.
  • Return All — Enable to fetch all matching results, paginating automatically up to a maximum internal page limit.
  • Limit — Specify the maximum number of records to return, ignored if 'Return All' is true.

Output shape

a list of records as JSON objects returned from the SuiteQL query execution.

If 'Return All' is true, the operation paginates through results, combining up to 1000 records per page until no more results or the internal maximum page count (500) is reached. If false, it returns up to the specified 'Limit'. Each item corresponds to a single record from the query result set.

Examples

Example 1: Fetch all active customers using the built-in template

Set 'Query Template' to 'Active Customers', enable 'Return All' if all records are needed, or limit result count.

Example 2: Run a custom SuiteQL SELECT statement

Set 'Query Template' to 'Custom Query' and input the SQL in 'Query'. Use 'Return All' or 'Limit' to control result size.

Links

Discussion