Record.setSublistValue() Errors and Fixes

Here are some common errors that can cause while using Record.setSublistValue() function. If not handled these errors can stop the sublist values from rendering on the NetSuite suitelet page. INVALID_FLD_VALUE errorThis error can happen if the value is passed as the value parameter in the Record.setSublistValue() function. The type should match the value passed.e.g: form.subLists.custpage_sublist1.addField({id:… Continue reading Record.setSublistValue() Errors and Fixes

Resolve SuiteScript Error – Invalid date value (must be D/M/YYYY)

The error is encountered when setting a string value for a Date field, as shown in the code snippet below: Solution The error being thrown by NetSuite is an expected behavior. Date field cannot accept string objects values. To be able to pass a Date value to this type of field, user must first convert the string value to Date Object using format.parse(options) under N/format module.