Trying to set date value on a scriptContext.newRec...
# suitescript
k
Trying to set date value on a scriptContext.newRecord in beforeSubmit userevent script. There are no errors in script log. Constantly getting 'Invalid date value (must be D.M.YYYY)' in UI. Tried '3.3.2021' as a string and new Date() as a Date object. The field is 'startdate' in 'supportcase' record type. Did anybody have similar error in beforeSubmit? Thanks.
upd: I also tried format.format and format.parse from 'N/format' module
Found the issue. It is relevant only for SuiteScript API 2.1. In API 2.0 I can not replicate it.