Vishnu Gupta
11/07/2019, 11:10 AM{
"type": "error.SuiteScriptError",
"name": "INVALID_FLD_VALUE",
"message": "Invalid date value (must be M/D/YYYY)",
"stack": [
"anonymous(N/serverRecordService)",
"createCashSale(/SuiteScripts/GetItem.js:106)",
"_get(/SuiteScripts/GetItem.js:24)",
"anonymous(N/serverRecordService)"
],
"cause": {
"type": "internal error",
"code": "INVALID_FLD_VALUE",
"details": "Invalid date value (must be M/D/YYYY)",
"userEvent": null,
"stackTrace": [
"anonymous(N/serverRecordService)",
"createCashSale(/SuiteScripts/GetItem.js:106)",
"_get(/SuiteScripts/GetItem.js:24)",
"anonymous(N/serverRecordService)"
],
"notifyOff": false
},
"id": "",
"notifyOff": false,
"userFacing": false
}
I am calling in this way
`var subscriptionStartDate = new Date();``
moment(subscriptionStartDate).format("M/D/YYYY")});
battk
11/07/2019, 11:11 AMbattk
11/07/2019, 11:11 AMbattk
11/07/2019, 11:11 AMbattk
11/07/2019, 11:12 AMbattk
11/07/2019, 11:13 AMVishnu Gupta
11/07/2019, 11:13 AMVishnu Gupta
11/07/2019, 11:15 AMsalesorder.setValue({fieldId:'subscriptionStartDate',value:moment(subscriptionStartDate).format("M/D/YYYY")});
How to write I am using a custom fieldbattk
11/07/2019, 11:16 AMbattk
11/07/2019, 11:17 AMbattk
11/07/2019, 11:17 AMbattk
11/07/2019, 11:17 AMVishnu Gupta
11/07/2019, 11:30 AMvar subscriptionStartDate = moment(new Date()).format("M/D/YYYY");
salesorder.setValue({fieldId:'subscriptionStartDate',value:subscriptionStartDate});
it's still failingbattk
11/07/2019, 11:35 AMbattk
11/07/2019, 11:36 AMbattk
11/07/2019, 11:36 AMbattk
11/07/2019, 11:36 AM