How to update record in NetSuite using Suite script

var theRecord=record.load({
  type: record.Type.SALES_ORDER,
  id:12344,   
  isDynamic: false, 
  defaultValues: null
}); 
log.debug("old value",theRecord.getValue({fieldId:'trandate'}));
theRecord.setValue({
 fieldId : 'trandate',
 value :invoiceDate
});
log.debug("New value",theRecord.getValue({fieldId:'trandate'}));
theRecord.save (); 

Published by deeps blog

Programmer

Leave a comment

Design a site like this with WordPress.com
Get started