I think you've introduced too many variables; coul...
# suitescript
e
I think you've introduced too many variables; could be greatly streamlined and easier to follow like:
Copy code
var results = search.load(...)
  .run()
  .getRange(...);
for (var i = 0; i < results.length; i++) {
  var columns = results[i].getAllColumns();
  var itemId = results[i].getValue(columns[2]);
  ...
}