Modules
Objects/Functions
SuiteScript 2.0
// Please search https://system.netsuite.com/app/help/helpcenter.nl?search=SuiteQL.query for more information.
N/query Module
SuiteQL.query
Property Description:
The string representation of the SuiteQL query.
This string can contain the following types of elements:
SQL clauses, such as SELECT, FROM, and WHERE
Record or table names, such as customer
Field names using dot notation, such as customer.entityid
Operators for conditions, such as = and >=
Formatting characters, such as newline characters (\n)
This string can also contain field formatting metadata, such as /*{entityid#RAW}*/. When you use Query.toSuiteQL() to convert a constructed query to its SuiteQL query equivalent, metadata may be added to the query string to indicate the formatting (or context) of fields in the query. For example, /*{entityid#RAW}*/ metadata indicates that the entityid field is formatted using the query.FieldContext.RAW field context from the query.FieldContext enum. This metadata is added as comments (using /* and */) and does not affect query execution or the query results.
Type:
string (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.query
Example:
// Code Example 1
// Add additional code
//...
// myQuery is an existing query.Query object
var mySuiteQLQuery = myQuery.toSuiteQL();
var theQuery = mySuiteQLQuery.query;
//...
// Add additional code
//SOURCE: https://system.netsuite.com/app/help/helpcenter.nl?fid=section_157960443690.html