I've got an issue with the SS2.1 debugger when cal...
# suitescript
w
I've got an issue with the SS2.1 debugger when calling format.parse().
Copy code
require(['N/format'], function (format) {
   var janFirst  = "1/1/2021"
   // this will complete ok
   var formatted1 = format.parse({
      value : janFirst,
      type  : "DATE"
   });
   var dateType = format.Type.DATE
   // but each of the following will fail with
   // Invalid invocation method: "getTimeFormat" for target:
   var formatted2 = format.parse({
      value : janFirst,
      type  : dateType
   });
   var formatted3 = format.parse({
      value : janFirst,
      type  : format.Type.DATE
   });
   var formatted4 = format.parse({
      value : janFirst,
      type  : "date"
   });
})
It works fine when debugging with SS2.0 or running without the debugger. It looks to be an issue in the
N/FieldValidationHelper
module, but I don't know how the SS2.1 debugger could be interfering with that or the
N/restricted/invoker
. Any thoughts?
b
bother netsuite support
w
Ive logged it with NS support, but I am not holding my breath for a response.
oh also I was wrong about formatted1, it just spits the string out without parsing it.