NetSuite v2 (Beta) Query activity in Jitterbit Studio
Introduction
A NetSuite v2 (Beta) Query activity, using its NetSuite v2 (Beta) connection, runs a SuiteQL query built from one or more selected tables and is intended to be used as a source to provide data in an operation.
This activity supports only queries that you build using the options in Step 3: Build Your Query.
Note
To run a SuiteQL query with functionality beyond what this activity supports, create a RESTlet script that executes the query, then call the script with a NetSuite v2 (Beta) Execute RESTlet activity as a source.
This connector is currently in beta. To provide feedback, contact the Jitterbit Product Team.
Prerequisites
This activity requires a metadata RESTlet script to be deployed in the NetSuite account. A valid metadata RESTlet script is available for download on the Harmony Downloads page.
Important
Do not modify the body of the downloaded metadata RESTlet script, except to add table names to the SUPPLEMENTAL_TABLES array as described in Make additional tables available.
Use version 1.1.0.0 or later of the script to make additional tables available in the Select Table(s)/View(s) list, such as TransactionLine, TransactionAccountingLine, PreviousTransactionLineLink, TransactionShipment, and JournalEntryLine. If you previously deployed an earlier version, download the latest script and update the deployed script.
After deploying the script, find its path in the URL field on the script deployment record (Customization > Scripting > Script Deployments), for example https://<accountID>.restlets.api.netsuite.com/app/site/hosting/restlet.nl?script=166&deploy=1:

Enter the path starting from /app/... in the activity's Metadata RESTlet Script Path field.
Make additional tables available
The Select Table(s)/View(s) list shows the tables that NetSuite's N/query module provides, including the tables listed in the SUPPLEMENTAL_TABLES array of the metadata RESTlet script. The N/query module does not provide every table available for SuiteQL queries. For more information, see NetSuite's query.Type documentation.
To make another table available in the list, such as a custom record type, add its name to the SUPPLEMENTAL_TABLES array near the top of the script:
-
In the downloaded script, add the SuiteQL table name in single quotes to the end of the
SUPPLEMENTAL_TABLESarray, and separate entries with commas. For example, to add a table namedcustomAddition:var SUPPLEMENTAL_TABLES = [ 'transactionLine', 'transactionAccountingLine', 'previousTransactionLineLink', 'transactionShipment', 'journalEntryLine', 'customAddition' ]; -
Update the deployed script in the NetSuite account with the modified script.
-
In the activity's Step 2, click Refresh to reload the list of tables and views.
Create a NetSuite v2 (Beta) Query activity
An instance of a NetSuite v2 (Beta) Query activity is created from a NetSuite v2 (Beta) connection using its Query activity type.
To create an instance of an activity, drag the activity type to the design canvas or copy the activity type and paste it on the design canvas. For details, see Creating an activity instance in Component reuse.
An existing NetSuite v2 (Beta) Query activity can be edited from these locations:
- The design canvas (see Component actions menu in Design canvas).
- The project pane's Components tab (see Component actions menu in Project pane Components tab).
Configure a NetSuite v2 (Beta) Query activity
Follow these steps to configure a NetSuite v2 (Beta) Query activity:
-
Step 1: Enter the metadata RESTlet script path
Enter the metadata RESTlet script path required by this activity. -
Step 2: Enter a name and select tables or views
Provide a name for the activity and select one or more tables or views. -
Step 3: Build Your Query
Select fields to retrieve, set paging and ordering, and add conditions to build the underlying SuiteQL query. -
Step 4: Review the data schemas
Any response schemas are displayed.
Step 1: Enter the metadata RESTlet script path
In this step, enter the metadata RESTlet script path required by this activity. Each user interface element of this step is described below.
-
Metadata RESTlet Script Path: Enter the deployed metadata RESTlet's script path (for example,
/app/site/hosting/restlet.nl?script=166&deploy=1); see Prerequisites. -
Save & Exit: If enabled, click to save the configuration for this step and close the activity configuration.
-
Next: Click to temporarily store the configuration for this step and continue to the next step. The configuration will not be saved until you click the Finished button on the last step.
-
Discard changes: After making changes, click to close the configuration without saving changes made to any step. A message asks you to confirm that you want to discard changes.
Step 2: Enter a name and select tables or views
In this step, provide a name for the activity and select one or more tables or views. Each user interface element of this step is described below.
-
Endpoint menu: If you have multiple endpoints of the same connector type configured, a menu at the top of the screen displays the current endpoint name. Click the menu to switch to a different endpoint. For more information, see Change the assigned endpoint in Configuration screens.
- Edit endpoint: Appears when you hover over the current endpoint name. Click to edit the currently selected endpoint's connection configuration.
-
Name: Enter a name to identify the activity. The name must be unique for each NetSuite v2 (Beta) Query activity and must not contain forward slashes
/or colons:. -
Select Table(s)/View(s): This section displays tables and views available in the NetSuite v2 (Beta) endpoint, listed from the metadata RESTlet deployed in your NetSuite account (see Prerequisites). If a table you expect, such as a custom record type, is not listed, see Make additional tables available.
-
Filter: Enter a filter for the table or view name to load. Click Refresh after entering a filter to load the matching results.
-
Refresh: Click the refresh icon or the word Refresh to load or reload tables and views from the NetSuite v2 (Beta) endpoint using the current filter.
Tip
If the list does not populate with available tables or views after entering a filter and refreshing, the NetSuite v2 (Beta) connection may not be successful. Ensure you are connected by reopening the connection and retesting the credentials.
-
Selecting tables or views: After refreshing, matching tables and views are displayed in a list on the left. Click a table or view to add it to the selection table on the right. Any number of tables and views may be selected to build a joined query.
-
Selected tables and views table: Selected tables and views are displayed in a table on the right. Each column is described below:
-
Table: The name of the selected table or view.
-
Parent: For each child table or view being joined, use the dropdown to select its parent. The first table selected has no parent and serves as the root of the join hierarchy. Once a parent is selected, an Assign link appears in the Link Keys column.
-
Join Type: After link keys have been assigned for a child table or view, use the dropdown to select the relationship type between the child and its parent:
- One or More: Each parent record must have at least one child record.
- One Only: Each parent record must have exactly one child record.
- Zero or More: Each parent record can have zero or more child records.
- Zero or One: Each parent record can have zero or one child record.
-
Link Keys: For each child table or view with a Parent selected, click Assign to open a separate window where you define the key relationships between the parent and child:
- Parent object: Displays the parent table or view and its fields on the left. Use the search box to filter fields.
- Child object: Displays the child table or view and its fields on the right. Use the search box to filter fields.
- Assign link key(s): Drag a field from the parent to the corresponding field in the child (or vice versa) to create a link. Repeat to assign multiple key pairs.
- Unassign link key(s): Click a field that has already been linked to remove its link assignment.
- Start over: Click to clear all assigned link keys.
- Finish: Click to save the link key assignments and close the window. The number of assigned link keys appears in the Link Keys column and the Join Type dropdown becomes available.
Note
The Next button remains disabled until all tables and views with a parent selected have their link keys assigned.
-
-
-
Back: Click to temporarily store the configuration for this step and return to the previous step.
-
Next: Click to temporarily store the configuration for this step and continue to the next step. The configuration will not be saved until you click the Finished button on the last step.
-
Discard changes: After making changes, click to close the configuration without saving changes made to any step. A message asks you to confirm that you want to discard changes.
Step 3: Build Your Query
In this step, select fields to retrieve, set paging and ordering, and add conditions to build the underlying SuiteQL query. Each user interface element of this step is described below.
Tip
Fields with a variable icon support using global variables, project variables, and Jitterbit variables. Begin either by typing an open square bracket [ into the field or by clicking the variable icon to display a menu listing existing variables to choose from.
-
Fields to Retrieve: Displays the fields available across the selected table(s)/view(s).
-
Search: Enter any part of a field name into the search box to filter the list of fields. The search is not case-sensitive. The listed results are filtered in real time with each keystroke.
-
Refresh: Click the refresh icon or the word Refresh to reload fields from the NetSuite v2 (Beta) endpoint.
-
Select All: Select the checkbox to select all visible fields at once.
-
Select fields: Select the checkboxes of the fields you want included in the query to have them automatically added to the Query String.
-
-
Paging: To add a paging clause (a limit on the number of records with an optional record offset), use the dropdown to set the paging limit and the field to enter an offset. If an offset is not specified, it defaults to
0. A single paging clause is supported. If a paging clause is not included, all records are returned.- Apply: Click to add the constructed paging clause to the Query String.
- Remove: Click to remove a paging clause that has been applied.
-
Order By: Use the dropdown to select a field to sort the results by, and add an ORDER BY clause to the Query String.
- Sort Direction: Select Ascending or Descending to set the sort direction for the selected field.
-
Conditions: To add conditional clauses, use the fields below as input to help construct the clauses, which then appear in the Query String.
- Object: Field: Use the dropdown to select a field from the selected table(s)/view(s).
- Operator: Use the dropdown to select an operator appropriate for the field's data type.
- Value: Enter the value to use with the selected field and operator.
- Add: Click to add the constructed clause to the Query String.
- Remove All: Click to remove all entered conditional clauses.
Important
To filter on a date-time field such as
lastmodifieddate, enter the Value using a date-only format,MM/DD/YYYY(for example,07/22/2025), rather than a date-time value. -
Query String: As you select fields, specify conditions, apply paging, and set ordering, the query statement in this field is autopopulated. This field reflects the underlying SuiteQL query that the activity runs and cannot be edited directly. Custom SuiteQL statements and more complex queries than those you can build with the options in this step are not supported.
The activity automatically adds an alias to each selected field in the form
tableName_columnName(for example,customer.entityid AS customer_entityid). Aliases keep column names unique when the query joins tables that contain columns with the same name, such asentityidin both thecustomerandemployeetables. You do not enter or edit the aliases. The activity uses them to group each result row by table, as described in Step 4.The underlying SuiteQL query does not support subqueries. For example, these query patterns are not supported:
SELECT Column_1, Column_2 FROM Table_1 WHERE Column_1 IN (SELECT Column_1 FROM Table_2)SELECT Column_1, Column_2, (SELECT COUNT(*) FROM Table_2) FROM Table_1SELECT sub.Column_1, sub.Column_2 FROM (SELECT Column_1, Column_2 FROM Table_1) AS subIf a query requires a subquery or is otherwise more complex than this activity supports, consider using a Saved Search activity with an equivalent saved search, or creating a RESTlet script that executes the query and calling it with an Execute RESTlet activity as a source (typically with the GET HTTP method), as alternatives to this activity.
-
Test Query: Click to validate the query. If the query is valid, a sample of records retrieved from the query is displayed. If the query is not valid, relevant error messages are displayed.
-
Back: Click to temporarily store the configuration for this step and return to the previous step.
-
Next: Click to temporarily store the configuration for this step and continue to the next step. The configuration will not be saved until you click the Finished button on the last step.
-
Discard changes: After making changes, click to close the configuration without saving changes made to any step. A message asks you to confirm that you want to discard changes.
Step 4: Review the data schemas
Any response schemas are displayed. Each user interface element of this step is described below.
-
Data schema: The response schema is generated dynamically from the fields selected in Step 3, with the fields grouped by the table they come from. This schema is inherited by adjacent transformations and is displayed again during transformation mapping.
The NetSuite v2 (Beta) connector uses NetSuite's SuiteTalk REST Web Services. Refer to the API documentation for additional information.
-
Refresh: Click the refresh icon or the word Refresh to regenerate schemas from the NetSuite v2 (Beta) endpoint. This action also regenerates a schema in other locations throughout the project where the same schema is referenced, such as in an adjacent transformation.
-
Back: Click to temporarily store the configuration for this step and return to the previous step.
-
Finished: Click to save the configuration for all steps and close the activity configuration.
-
Discard changes: After making changes, click to close the configuration without saving changes made to any step. A message asks you to confirm that you want to discard changes.
Next steps
After configuring a NetSuite v2 (Beta) Query activity, complete the configuration of the operation by adding and configuring other activities, transformations, or scripts as operation steps. You can also configure the operation settings, which include the ability to chain operations together that are in the same or different workflows.
Menu actions for an activity are accessible from the project pane and the design canvas. For details, see Activity actions menu in Connector basics.
NetSuite v2 (Beta) Query activities can be used as a source with these operation patterns:
- Transformation pattern
- Two-target archive pattern (as the first source only)
- Two-target HTTP archive pattern (as the first source only)
- Two-transformation pattern (as the first or second source)
To use the activity with scripting functions, write the data to a temporary location and then use that temporary location in the scripting function.
When ready, deploy and run the operation and validate behavior by checking the operation logs.