title: How Do I Get a Netsuite Saved Search of Item Groups through SuiteTalk
body: <p>I have a saved search in Netsuite that's only criteria is "Type is Item Group" and I am trying to use the Soap API SuiteTalk to retrieve its results through PHP.</p>
  
  <p>Here's the function I'm using:</p>
  
  <pre><code>function getSavedSearch($ns_client, $search_id, $search_type, $page_size = 1000) {
      $searchItem = array();
      $searchItem['savedSearchId'] = $search_id;
  
      $search = new nsComplexObject($search_type);
      $search-&gt;setFields($searchItem);
  
      $ns_client-&gt;setSearchPreferences(false, $page_size);
      return $ns_client-&gt;search($search);
  }
  </code></pre>
  
  <p>I try calling it with the search's internalId and the type 'ItemSearchAdvanced' but that returns a search with 0 records.</p>
  
  <p>If I change  the type to 'ItemSearchBasic' it seems to ignore the search criteria and I get every item record in the system (not limited to item groups).</p>
  
  <p>I am able to use the same function to retrieve the results of other saved searches such as as "Transaction Search" using the type "TransactionSearchAdvanced".</p>
  
  <p>I suspect there is a different search type I should be using but I can't find any references to what it should be.</p>