I have created a search that outputs the following...
# suitescript
l
I have created a search that outputs the following JSON
{"values":{"GROUP(vendor.entityid)":"xxx","AVG(vendor.internalid)":"xxx"}}
However when I use the following code to get the values in the result it returns null
var name = result.getValue({
"name": "vendor.entityid",
"summary": search.Summary.GROUP
});
var internalId = result.getValue({
"name": "vendor.internalid",
"summary": search.Summary.GROUP
});
Can someone help me?
d
The object in the getValue should match the object in your search column.
for example
result.getValue({name:entityid,join:vendor})
s
For summarized/joined columns, it is typically easier to use the column index based syntax for result,getValue() Result.getValue(column)
l
Thank you for your help, I appreciate it