https://netsuiteprofessionals.com logo
#suitescript
Title
# suitescript
a

Azi

04/01/2022, 1:26 PM
How does one use a multiselect from the form of serverWidget of a suitelet and access that data in the post? I have no idea how they expect this data to be parsed. When I log the data it looks like this
b

battk

04/01/2022, 1:30 PM
netsuite internally uses
\u0005
as the delimiter for multiselects
you have to split the string yourself
a

Azi

04/01/2022, 2:05 PM
Thank you so much! I spent hours trying to come up with a solution! How did you know that?
b

battk

04/01/2022, 2:07 PM
use String.prototype.charCodeAt to figure out what the delimiter is
once you know what it is, you could do a search in help to find a few examples of netsuite splitting multi selects like that
m

mattdahse

04/01/2022, 2:21 PM
This behavior is legitimately ridiculous.
💯 1
a

Azi

04/01/2022, 2:23 PM
Thanks for your help @battk. Thanks for the validation @mattdahse
e

ec

04/01/2022, 4:25 PM
FYI, though, if you are just reading in the value of the multiselect and setting the value of a multi select field in the backend/record, you don’t need to parse at all
a

Azi

04/01/2022, 6:44 PM
I was getting list of employees in the GET and emailing it those recipients in the POST