Modules

filter

 

Objects/Functions

module (N/query)

SuiteScript 2.0

SuiteQL.params

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

N/query Module
SuiteQL.params
Property Description: The parameters for the query. In SuiteQL, query conditions are represented using the WHERE clause and a set of parameters. In a SuiteQL string, parameter values for conditions are represented using question marks (?), and the params property includes a list of the parameter values to use when the query runs. If the query uses more than one parameter, the order of the values in the params property matches the order the parameters appear in the query string. For example, consider the following query.Condition object in a query for customer records: If you use Query.toSuiteQL() to convert this query to SuiteQL, the resulting SuiteQL query string includes the following WHERE clause: In the resulting query.SuiteQL object, the params property includes the value 50000.
Type: Array (read-only)
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.params

Example:

// Code Example 1
myQueryObject.createCondition({
fieldId: 'creditlimit',
operator: query.Operator.LESS_OR_EQUAL,
values: [50000]
});

// Code Example 2
WHERE customer.creditlimit <= ?

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

var theParams = mySuiteQLQuery.params;
//...
// Add additional code

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