Modules

filter

 

Objects/Functions

module (N/query)

SuiteScript 2.0

query.Period

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

N/query Module
query.Period
Object Description: A period of time to use in query conditions. Use query.createPeriod(options) to create this object. After you create this object, you can use it in the values parameter of Query.createCondition(options) or Component.createCondition(options).
Supported Script Types: Client and server scripts For more information, see SuiteScript 2.0 Script Types.
Module: N/query Module
Methods and Properties: Period Object Members
Since: 2020.1
Search NetSuite - https://system.netsuite.com/app/help/helpcenter.nl?search=query.Period

Example:

// Code Example 1
// Add additional code
//...
var myPeriod = query.createPeriod({
code: query.PeriodCode.LAST_PERIOD,
adjustment: query.PeriodAdjustment.ALL,
type: query.PeriodType.END
});

// myQuery is an existing query.Query object
var myComplexCondition = myQuery.createCondition({
fieldId: 'trandate',
operator: query.Operator.BEFORE,
values: [myPeriod]
});
//...
// Add additional code

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