format.getCurrencyFormatter(options)
The content in this help topic pertains to SuiteScript 2.0.
Method Description |
Creates a format.CurrencyFormatter object to format numbers into currency strings. |
Returns |
Object |
Supported Script Types |
Client and server scripts For more information, see SuiteScript 2.x Script Types. |
Governance |
10 units |
Module |
|
Methods and Properties |
|
Since |
2019.2 |
Parameters
The options
parameter is a JavaScript object.
Parameter |
Type |
Required / Optional |
Description |
Since |
---|---|---|---|---|
|
string |
required if |
Code of the currency that is used by formatter. |
2019.2 |
|
string |
required if |
Code of the locale that is used by formatter. |
2021.1 |
These parameters are mutually exclusive, you can always use only one of them.
Errors
Error Code |
Thrown If |
---|---|
SSS_MISSING_REQD_ARGUMENT |
Currency parameter is missing |
SSS_INVALID_CURRENCY |
The currency is not valid |
SSS_INVALID_TYPE_ARG |
The parameter type is wrong |
NEITHER_ARGUMENT_DEFINED |
Both parameters are missing |
MUTUALLY_EXCLUSIVE_ARGUMENTS |
Multiple mutually exclusive parameters have been set as required or optional |
INVALID_LOCALE |
The locale is not valid |