Modules

filter

 

Objects/Functions

module (N/query)

SuiteScript 2.0

Sort.locale

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

N/query Module
Sort.locale
Property Description: The locale to use for the sort. This property uses values from the query.SortLocale enum. This property is set during the execution of Query.createSort(options) and Component.createSort(options). A locale represents a combination of language and region, and it can affect how certain values (such as strings) are sorted. For example, languages that share the same alphabet may sort characters differently. Use this property to ensure that query results are sorted using locale-specific rules.
Type: string
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.locale

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 theLocale = myCustomerQuery.sort[0].locale;
//...
// Add additional code

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