<ms-netsuite-rest:suiteql-query
config-ref="Config"
doc:name="SuiteQL Query"
query="SELECT id, companyname FROM customer WHERE companyname LIKE 'A%'"
pageSize="100"/>
Configuring Query Operations
Configure the operations that read collections of NetSuite data with automatic pagination: SuiteQL Query and Get All Records.
Both operations paginate automatically and return an array of messages, so you can use a For Each scope to process individual rows or records. Pagination attributes are available on each item’s message attributes. For full parameter, output, and error details, see NetSuite REST Connector Reference.
Configure the SuiteQL Query Operation
The SuiteQL Query operation runs a SuiteQL query against NetSuite data with automatic pagination by sending POST /query/v1/suiteql. SuiteQL is a SQL-like query language for NetSuite records.
To configure the SuiteQL Query operation:
-
Select the operation on the Anypoint Code Builder or Studio canvas.
-
In the General properties tab for the operation, enter these values:
-
Query
The SuiteQL query string (for example,
SELECT id, companyname FROM customer WHERE companyname LIKE 'A%'). -
Page Size
Number of rows per page, which maps to the REST API
limitparameter. Defaults to 100. -
Max Total Results
Maximum total rows to return across all pages. Defaults to 100000, which matches NetSuite’s hard cap per query. Set to
-1for unlimited, but NetSuite returns an error if the result set exceeds 100,000 rows.
-
Configure the Get All Records Operation
The Get All Records operation retrieves a collection of records with automatic pagination and optional filtering by sending GET /record/v1/{recordType}. It returns ID stubs, so use Get Record to fetch full record bodies.
To configure the Get All Records operation:
-
Select the operation on the Anypoint Code Builder or Studio canvas.
-
In the General properties tab for the operation, enter these values:
-
Record Type
The NetSuite record type (for example,
customer,salesOrder, orinvoice). -
Filter Query
Optional NetSuite filter expression (for example,
email IS john@example.com). For complex queries, use SuiteQL Query instead. -
Page Size
Number of records per page, which maps to the REST API
limitparameter. Defaults to 100. -
Max Total Results
Maximum total records to return across all pages. Defaults to
-1(unlimited).
-



