Skip to main content

SuiteBuilder Updates in NetSuite 2021.2

2021.2 SuiteBuilder |

Improved Security for Storing Custom Password Field

Values

As of 2021.2, the SuiteScript 1.0 nlapiEncrypt(s, algorithm, key) default encryption method is no longer supported when used to check custom password fields. In addition, SuiteScript 2.x Record.getValue(options) and CurrentRecord.getValue(options) methods are no longer supported for custom password fields. You can use the SuiteScript 1.0 nlapiCheckPasswordField(type, id, value, field, sublist, line) function or the SuiteScript 2.x crypto.checkPasswordField(options) method to check and validate values in custom password fields. In SuiteScript 2.x, if you continue to use Record.getValue(options) or CurrentRecord.getValue(options) on custom password fields, the value will no longer be returned as a hashed value, but will be obfuscated instead. For this reason, you should use the crypto.checkPasswordField(options) in your SuiteScript 2.x scripts. For more information, see the help topic crypto.checkPasswordField(options).

Update your scripts to use the new SuiteScript checkPasswordField APIs. For more information, see

SuiteAnswer 96720: Upcoming Changes to Supported APIs for Checking Custom Password Fields. New Locale Parameter for Numbers in Advanced Printing

Templates

A new parameter is available for the nsformat_number formatting method. The new parameter enables you to specify the locale to use to format the value of a numerical field. This parameter overrides the locale of the logged in user for the specific field only. You can set this parameter in the source code only. The format of the new parameter is ${nsformat_number(record.field,”xx_XX”)}, where record.field represents the field and xx_XX represents the country locale code. For example, use ${nsformat_number(item.quantity, “cs_CZ”)} to format the Quantity field according to Czech Republic standards. If the locale code is valid, the results are formatted according to the locale specified. If the locale code is invalid, the formatting defaults to use en_US (U.S. English). If the locale value is null or empty, the formatting defaults to use the locale of the logged-in user. For more information, see the FreeMarker Formatting Method section of Syntax for Advanced Template Fields.