Categories

Set Time of Day field in Netsuite SuiteScript 2.0

 

Steps to Set Time of Day field in 2.0

Create a field 

Set type as time of day

Use debugger to set the field value 

Field value is set

Source Code:

require([‘N/format’,’N/record’],

 function(format,record){

record.submitFields({

type: record.Type.SALES_ORDER,

id: 1,

values: {

custbody_time_of_day: format.format({value: new Date(), type: format.Type.TIMEOFDAY})

},

options: {

enableSourcing: false,

ignoreMandatoryFields : true

}

});

});

adbanner