Anybody faced this before: `INVALID_FLD_VALUE","me...
# suitescript
a
Anybody faced this before:
INVALID_FLD_VALUE","message":"Invalid date value (must be MM/DD/YYYY)
b
either the Date you are trying to set is invalid, or netsuite is being weird and wants you to use the format module
Copy code
var chargeStart = moment(oLine[SO_FIELDS.CONTRACT_START]).toDate();
myRecord.setValue({ fieldId: "custcol_my_field", value: chargeStart });
probably want to check that the Date was parsed properly and is a valid Date
s
I have run into that and forced the value through the
format
module as @battk suggests and NS then accepted it.
j
Ha! Just seen that error first time a 10 minutes ago needed today so used var _date = new Date(); and that worked for me