Set Decimal Number with Trailing Zeros
When you set a decimal number value in JavaScript, behavior depends on the format of the numeric value. In SuiteScript 2.0, if there are trailing zeros in a decimal value you set, the value is set as a double precision floating point number (double). In SuiteScript 2.1, if there are trailing zeros in a decimal value you set, the value is set as an integer value. Note that in both SuiteScript 2.0 and SuiteScript 2.1, a value is always set as a double value if there are no trailing zeros in the decimal value you specify.
|
Scenario |
SuiteScript 2.0 Behavior |
SuiteScript 2.1 Behavior |
|---|---|---|
|
Set a decimal value with trailing zeros:
|
|
|
|
Set a decimal value with no trailing zeros:
|
|
|