`var cols = results[i].getAllColumns();` use the i...
# suitescript
s
var cols = results[i].getAllColumns();
use the index of the thing you are looping on (resultRange)