Modules

filter

 

Objects/Functions

module (N/query)

SuiteScript 2.0

Sort.ascending

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

N/query Module
Sort.ascending
Property Description: Whether the sort direction is ascending. This property is set during the execution of Query.createSort(options) and Component.createSort(options). The default value of this property is true, meaning that the sort direction is ascending. If you want the sort direction to be descending, set this property to false.
Type: boolean
Module: N/query Module
Parent Object: query.Sort
Sibling Object Members: Sort Object Members
Since: 2018.2
Search NetSuite - https://system.netsuite.com/app/help/helpcenter.nl?search=Sort.ascending

Example:

// Code Example 1
// Add additional code
//...
var myCustomerQuery = query.create({
type: query.Type.CUSTOMER
});

myCustomerQuery.columns = [
myCustomerQuery.createColumn({
fieldId: 'entityid'
})
];

myCustomerQuery.sort = [
myCustomerQuery.createSort({
column: myCustomerQuery.columns[0],
ascending: false,
caseSensitive: true,
locale: query.SortLocale.EN_CA,
nullsLast: false
})
];

var theAscending = myCustomerQuery.sort[0].ascending;
//...
// Add additional code

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