Modules
Objects/Functions
SuiteScript 2.0
{NumberFormatter}.format({number: {number*}})
N/format/i18n Module
NumberFormatter.format()
Method Description:
Format number to the number string.
Returns:
String
Supported Script Types:
Client and server-side scripts
For more information, see SuiteScript 2.0 Script Types.
Governance:
10 units
Module:
N/format/i18n Module
Methods and Properties:
N/format/i18n Module Members
Since:
2019.2
Search NetSuite -
https://system.netsuite.com/app/help/helpcenter.nl?search=NumberFormatter.format(options)
Example:
// Code Example 1
// Add additional code
//...
require(['N/format/i18n'],
function(format) {
var numFormatter = format.getNumberFormatter({
groupSeparator: " ",
decimalSeparator: ",",
precision: 2,
negativeNumberFormat: format.NegativeNumberFormat.MINUS});
// all parameters defined
log.debug(numFormatter.format({number: 12845.22}));
});...
// Add additional code
//SOURCE: https://system.netsuite.com/app/help/helpcenter.nl?fid=section_1558031908.html