I am using SS 2.0 and setting all date fields usin...
# suitescript
b
I am using SS 2.0 and setting all date fields using native JavaScript date objects, as I do in every other script. I'm doing this in a User Event script, so it can't be triggering any other scripts.
a
Some date fields need some specific format, that exactly what that error is. Date Fields as many others in NetSuite are not 100% consistent across the system all the time.
b
That's my challenge. On one hand, I've never seen any date field in SS2.0 being set any other way besides a native JavaScript date object (unless you are using submitFields). On the other hand, if it DOES require something different -- I have no idea which field it is talking about. And finally, it seems to be suggesting that I'm currently giving it a value of null. I looked at every possible date field on that record, and I don't see it. I think I will have to open a ticket for it.
p
Install NetSuite Field Explorer & dump an already saved record. Have a look at it and see if there’s any date fields that you’re not setting in your script
b
I did. That's how I found every potential date field, and I'm setting them all.
p
Good luck with your ticket 😞 Not fun
b
I have found the new Subscription subsystem to be extremely frustrating to work with. Far too many things don't work consistently, or are not documented.
s
Try using setText instead of setValue
b
can you use setText on DATE fields?
b
setText is for setting it via a string like 01/01/20
id be surprised if it helped with your null value error
b
I understand ... I just didn't think you could use setText on anything other than select fields
b
you can also use it to set percentages on discounts
👍 1