Hello everyone,
I am facing an issue while transforming Sales order to Invoice via script, though my script works for some sales orders and not for others and there is no difference between two.
Error I am getting : {"type":"error.SuiteScriptError","name":"DATE_EXPECTED","message":"You entered 'null' into a field where a calendar date was expected.\\nPlease go back and change this value to the correct date.","id":"","stack":["anonymous(N/serverRecordService)","map(/SuiteScripts/edgetechinc Script/transformOldSOMR.js:249)"],"cause":{"type":"internal error","code":"DATE_EXPECTED","details":"You entered 'null' into a field where a calendar date was expected.\\nPlease go back and change this value to the correct date.","userEvent":null,"stackTrace":["anonymous(N/serverRecordService)","map(/SuiteScripts/edgetechinc Script/transformOldSOMR.js:249)"],"notifyOff":false},"notifyOff":false,"userFacing":false}
There is no such filed exist on invoice record. Also both (Sales order and Invoice) forms are custom. I also tried with standard SO form but didn't work.