Hi All. Hopefully a super simple one, but i'm draw...
# suitescript
s
Hi All. Hopefully a super simple one, but i'm drawing a blank on a Friday! How do you null (or re-initialize) a custom date field? I have tried null,"",undefined in record.submitfields but the only one that works is null, but that sets it to 1/1/1970. I also tried to load, setValue as null, save - but this also produces an error. Cheers
c
have you tried a space
like ' '
k
Space should work.
s
I've never had a problem using an empty string, but I think
null
has cleared it out as well.
s
in SS2.x I think null is supposed to be what we use
is it possible that field has some sort of defaulting?
s
Thats my thought, something else is overriding the clearing out bit
s
There was a script deployed which was affecting it - record.submitfields with null works, interestingly a string with a space does not As always, thanks lads hope you have a great weekend!
s
I try to avoid empty strings and single-space-string with NetSuite because it leaves just a bad taste in my mouth. Fortunately
null
seems to work in most places now.