Issue of occurrence of 1.0 while setting 1 in SO sublist

Jira Code: PROT-183
An issue occurred while populating a custom column field in the Sales Order sublist. The data was populated using UE script (beforeSubmit). The data being set was 1 and the data set was 1.0.

Solution:

for(var i=0;i<lineCount;i++){
    			sales_order.setSublistValue({
    			    sublistId: 'item',
    			    fieldId: 'custcol35',
    			    line: i,
    			    value: (i+1).toFixed(0);
    			});
  • use toFixed(0) before setting the data.

https://stackoverflow.com/questions/46211731/netsuite-suitescript-2-0-invalid-fld-value-when-setting-sublist-field-value

Leave a comment

Your email address will not be published. Required fields are marked *