Hi there, I am just trying to pull values from a s...
# suitescript
d
Hi there, I am just trying to pull values from a saved search using the .getValue() function, however for the columns such as Item : Internal ID, I am unable to provide the correct name for it to return a value? It only returns null.
So my call search.getValue({ name: 'quantity' }); works and returns quantity value as expected.
search.getValue({ name: 'Item : Internal ID' });
However this call returns null.
b
getValue also takes column objects. Use result.columns in a loop and pass that to getValue like: getValue(columnObj)
columnObj includes name or label properties so you can use those to tell which field you are getting
d
Thanks Adolfo, really appreciate your help 🙂
r
what you are doing is a join. If this gives you quantity,
Copy code
result.getValue({name: 'quantity'});
then this will give you the internalId of the item:
Copy code
result.getValue({name: "internalid",join: "item"})
☝️ 1
💯 1
d
That is fantastic! Thank you so much Raghav!!