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 |
Supported Script Types |
Client and server scripts For more information, see SuiteScript 2.x Script Types. |
Module |
|
Methods and Properties |
|
Since |
2020.1 |
Syntax
The following code sample shows the syntax for this member. It is not a functional example. For a complete script example, see N/query Module Script Samples.
// 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