Modules
Objects/Functions
SuiteScript 2.0
{query}.createPeriod({code: {string*},adjustment: {string},type: {string}})
N/query Module
query.createPeriod()
Method Description:
Creates a query.Period object.
Returns:
query.Period
Supported Script Types:
Client and server scripts
For more information, see SuiteScript 2.0 Script Types.
Governance:
None
Module:
N/query Module
Sibling Module Members:
N/query Module Members
Since:
2020.1
Search NetSuite -
https://system.netsuite.com/app/help/helpcenter.nl?search=query.createPeriod(options)
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_158289670344.html