Discussions
Stay up-to-date with the latest news from NetSuite. You’ll be in the know about how to connect with peers and take your business to new heights at our virtual, in-person, on demand events, and much more.
New AI Community Guidelines. Please review and follow them to ensure AI use stays safe, accurate, and compliant.
Keep an eye out for upcoming NetSuite events, including meetups, workshops, and webinars. These sessions are a great way to connect with peers, learn from experts, and stay current on the latest NetSuite updates and best practices. Registration links are provided in each event.
Add empty option with addSelectOption
So cannot really see anything wrong with this, but it throws an error:
{"type":"error.SuiteScriptError","name":"SSS_MISSI NG_REQD_ARGUMENT","message":"Field.addSelectOption : Missing a required argument: options.value"...
Trying to add an empty value option at top of my options list. Here's the code. Operator error or bug?
<span style="font-family:'courier new'">fld.addSelectOption({ value : "", text : "-Select an Option-", isSelected : false });</span> And BTW, the code below works! So addSelectOption in 1.0 allowed an empty option value. Seems addSelectOption in 2.0 does not.
<span style="font-family:'courier new'">fld.addSelectOption({ value : " ", text : "-Select an Option-", isSelected : false });</span> 0