title: SuiteScript 2 result set
body: <p>I am writing a script in 2.0, here is the snippet. </p>
  
  <pre><code>var resultSet = [];
  var result = search.load({
    id:'customsearch_autosend_statement_invoice'
  }).run().each(function( item ) {
    resultSet.push(item);
  });
  </code></pre>
  
  <p>If I run this saved search in the normal interface I get lots of rows like 2000 plus, but if I run this code I get back 1 row, even using the each function and adding the items to another array I only get one row. I don't see anything in the documentation about this. Can anyone tell me why this is? I'm stumped. thanks in advance for any help </p>