I've been struggling with a problem for hours now which is probably very simple but I can't work it out?
I am pulling multiple values from a search in suitescript 1 and putting into a variable called resultSize. Using Log Execution this shows 2,4 as these correspond to two items from a multiple select list.
This is the value I am using:
var resultSize = results[0].getValue('custrecord315');
When I pass resultSize to the filter then I get an error:
The error I get is "Filter expecting numeric value was removed, as non-numeric value '2,4' was provided"
If I hardcode the variable as var resultSize= [2,4]; then the correct info is passed to the filter and the search functions as expected.
filters[2] = new nlobjSearchFilter('custentity_employees','customer','anyof',resultSize);
If I do not hardcode the variable resultSize but instead just pass this:
var resultSize = results[0].getValue('custrecord315');
That gives the error.
Does anyone know how I can parse the values in 'custrecord315' to a variable such that the filter will accept it with anyOf
Many thanks