superkumario64
04/30/2019, 10:44 PMvar datestr = '2016-03-12 13:00:00';
var date = obj.moment(datestr).toDate();
log.debug("date", date);
log.debug("typeof date", typeof date);
newRec.setValue({
"fieldId": "notedate",
"value": date
});
What’s the gotcha with setting datetimes? do you want to set it to a date obj or a datestr? right now its a date object, but only the date is correct, the time is not correct when I look at the note in netsuitescottvonduhn
04/30/2019, 11:06 PMbattk
04/30/2019, 11:14 PMbattk
04/30/2019, 11:14 PMbattk
04/30/2019, 11:14 PMbattk
04/30/2019, 11:17 PMbattk
04/30/2019, 11:18 PMscottvonduhn
04/30/2019, 11:23 PMscottvonduhn
04/30/2019, 11:26 PMsuperkumario64
04/30/2019, 11:28 PMsuperkumario64
04/30/2019, 11:30 PMvar mDate = obj.moment("2016-03-12 13:00:00").toISOString();
would something like that work?battk
04/30/2019, 11:31 PMscottvonduhn
04/30/2019, 11:31 PMbattk
04/30/2019, 11:31 PMsuperkumario64
04/30/2019, 11:31 PMsuperkumario64
04/30/2019, 11:32 PMbattk
04/30/2019, 11:34 PMsuperkumario64
04/30/2019, 11:34 PMbattk
04/30/2019, 11:36 PMbattk
04/30/2019, 11:36 PMbattk
04/30/2019, 11:37 PMbattk
04/30/2019, 11:37 PMbattk
04/30/2019, 11:37 PMsuperkumario64
04/30/2019, 11:37 PM{
"type": "error.SuiteScriptError",
"name": "INVALID_FLD_VALUE",
"message": "The field notedate contained more than the maximum number ( 11 ) of characters allowed.",
"stack": [
"anonymous(N/serverRecordService)",
"get(/SuiteScripts/repo/restlets/KwaPlayTime.js:36)",
"anonymous(N/serverRecordService)"
],
"cause": {
"type": "internal error",
"code": "INVALID_FLD_VALUE",
"details": "The field notedate contained more than the maximum number ( 11 ) of characters allowed.",
"userEvent": null,
"stackTrace": [
"anonymous(N/serverRecordService)",
"get(/SuiteScripts/repo/restlets/KwaPlayTime.js:36)",
"anonymous(N/serverRecordService)"
],
"notifyOff": false
},
"id": "",
"notifyOff": false,
"userFacing": false
}
superkumario64
04/30/2019, 11:38 PMbattk
04/30/2019, 11:38 PMsuperkumario64
04/30/2019, 11:39 PMbattk
04/30/2019, 11:39 PMsuperkumario64
04/30/2019, 11:40 PMsuperkumario64
04/30/2019, 11:42 PMbattk
04/30/2019, 11:43 PMsuperkumario64
04/30/2019, 11:43 PMbattk
04/30/2019, 11:43 PMbattk
04/30/2019, 11:44 PMsuperkumario64
04/30/2019, 11:45 PMsuperkumario64
04/30/2019, 11:45 PMsuperkumario64
04/30/2019, 11:45 PMsuperkumario64
04/30/2019, 11:46 PMsuperkumario64
04/30/2019, 11:46 PMsuperkumario64
04/30/2019, 11:47 PMsuperkumario64
04/30/2019, 11:47 PMbattk
04/30/2019, 11:48 PMsuperkumario64
04/30/2019, 11:49 PMsuperkumario64
04/30/2019, 11:50 PMtime
and notedate
battk
04/30/2019, 11:58 PMsuperkumario64
05/01/2019, 12:05 AM