How backwards is this. When doing a lookupfields o...
# suitescript
a
How backwards is this. When doing a lookupfields on a multi-select field in netsuite, it yields the following results. If the multi select has no value, it returns an empty array. If it has one value, it is an array with the single value . If it has multiple values (hence the name multi select) then it is a delimited string of the values?!?!? Aside from keeping the types the same shouldn't it be the exact opposite??? Isn't the whole purpose of an array for multiple values?
b
probably a bug, its supposed to be an array of objects like with one value
s
I'd like to see an array in all cases - empty, single, or multivalued
a
Thats what I would have wanted as well
Which is the whole advantage of arrays
I am using search.lookupFields.promise in a client script so maybe it has something to do with the promise part of it
s
maybe just do a search instead, since I think lookupFields is no faster
a
Its not?
e
^looked into this and surprisingly the governance for search.create is 0 and search.run = 0. Where as search.lookupfield = 1. Can that be right??
b
you spend points when you use the database. you only get the search results when you use ResultSet.getRange or ResultSet.each