i have a custom field name contactprefer in my SAL...
# suitescript
r
i have a custom field name contactprefer in my SALES ORDER and i have set the type to multiple select and i have selected two record 'client1' & 'client2' in that custom field and i want 'client1's' email set on the SALES ORDER .... i tried the traditional method of loading with record.load with getvalue for that field gives me 'TWO' different values in error object telling me that it is invalid value .... how do just go to 1 record which i prefer?
s
Log what
getValue()
is returning. If it is an array, just read whichever option you want from the array. If it is a comma separated string, then
.split
the string on commas and read whatever option you want from the array
r
no its an error that getvalue has invalid values, its not an array but error object
s
Your original comment said it gave you 2 different values
r
yeah thanks
b
Share the code