<@U5H9HECTS> Basic Example var resultset = myS...
# suitescript
b
@screnshaw Basic Example var resultset = mySearch.run(); var results = resultset.getRange(0, 1000); for(var i in results){ var result = results[i]; for(var k in result.columns){ log.debug('Result is ' + result.getValue(result.columns[k])); //Access result from here } }
s
borncorp: Ok, so I will need to loop through each individual one and set it to a new object to get the value then?
Was hoping there was a setting I could use in my search that would flatten it.
b
Yeah, just looping, That's how it's done. The reason why is because sometimes you want to get the text and sometimes the value. For example if I want the text of the employee "borncorp" I would do result.getText , if I want the internal id I would use result.getValue .