{"action":"created","issue":{"url":"https://api.github.com/repos/NetSweet/netsuite/issues/205","labels_url":"https://api.github.com/repos/NetSweet/netsuite/issues/205/labels{/name}","comments_url":"https://api.github.com/repos/NetSweet/netsuite/issues/205/comments","events_url":"https://api.github.com/repos/NetSweet/netsuite/issues/205/events","html_url":"https://github.com/NetSweet/netsuite/issues/205","id":97769388,"number":205,"title":"NoMethodError: undefined method `results' for false:FalseClass when using NetSuite::Records::InventoryItem.search.results_in_batches","user":{"login":"glennfu","id":20549,"avatar_url":"https://avatars.githubusercontent.com/u/20549?v=3","gravatar_id":"","url":"https://api.github.com/users/glennfu","html_url":"https://github.com/glennfu","followers_url":"https://api.github.com/users/glennfu/followers","following_url":"https://api.github.com/users/glennfu/following{/other_user}","gists_url":"https://api.github.com/users/glennfu/gists{/gist_id}","starred_url":"https://api.github.com/users/glennfu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/glennfu/subscriptions","organizations_url":"https://api.github.com/users/glennfu/orgs","repos_url":"https://api.github.com/users/glennfu/repos","events_url":"https://api.github.com/users/glennfu/events{/privacy}","received_events_url":"https://api.github.com/users/glennfu/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":9,"created_at":"2015-07-28T18:26:06Z","updated_at":"2015-09-11T14:55:23Z","closed_at":"2015-08-26T12:32:49Z","body":"Starting only July 24th, and every day since, this code has started failing, even though the server hasn't been updated. My code looks like this:\r\n\r\n    search = NetSuite::Records::InventoryItem.search\r\n    ns_items = []\r\n    search.results_in_batches do |batch|\r\n      puts \"batch: #{batch.length}\"\r\n      ns_items += batch\r\n    end\r\n    ns_items.length\r\n\r\nThe output looks like this:\r\n\r\n```\r\nbatch: 1000\r\nD, [2015-07-28T13:18:49.907366 #42726] DEBUG -- : HTTPI GET request to webservices.na1.netsuite.com (net_http)\r\nD, [2015-07-28T13:18:50.073021 #42726] DEBUG -- : HTTPI POST request to webservices.na1.netsuite.com (net_http)\r\nbatch: 1000\r\nD, [2015-07-28T13:19:03.984211 #42726] DEBUG -- : HTTPI GET request to webservices.na1.netsuite.com (net_http)\r\nD, [2015-07-28T13:19:04.164485 #42726] DEBUG -- : HTTPI POST request to webservices.na1.netsuite.com (net_http)\r\nbatch: 1000\r\nD, [2015-07-28T13:19:19.110026 #42726] DEBUG -- : HTTPI GET request to webservices.na1.netsuite.com (net_http)\r\nD, [2015-07-28T13:19:19.286344 #42726] DEBUG -- : HTTPI POST request to webservices.na1.netsuite.com (net_http)\r\nNoMethodError: undefined method `results' for false:FalseClass\r\n\tfrom ~/.rvm/gems/ruby-2.2.2/bundler/gems/netsuite-8e2bdcdd9af1/lib/netsuite/support/search_result.rb:90:in `results_in_batches'\r\n\tfrom ~/.../app/models/inventory_item.rb:43:in `update_kit_ids'\r\n```\r\n\r\nI'm using netsuite gem 0.4.2 at revision: 8e2bdcdd9af1692ffab21945fafbb987be057375\r\n\r\nIs there something I can do to fix this?"},"comment":{"url":"https://api.github.com/repos/NetSweet/netsuite/issues/comments/139567186","html_url":"https://github.com/NetSweet/netsuite/issues/205#issuecomment-139567186","issue_url":"https://api.github.com/repos/NetSweet/netsuite/issues/205","id":139567186,"user":{"login":"glennfu","id":20549,"avatar_url":"https://avatars.githubusercontent.com/u/20549?v=3","gravatar_id":"","url":"https://api.github.com/users/glennfu","html_url":"https://github.com/glennfu","followers_url":"https://api.github.com/users/glennfu/followers","following_url":"https://api.github.com/users/glennfu/following{/other_user}","gists_url":"https://api.github.com/users/glennfu/gists{/gist_id}","starred_url":"https://api.github.com/users/glennfu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/glennfu/subscriptions","organizations_url":"https://api.github.com/users/glennfu/orgs","repos_url":"https://api.github.com/users/glennfu/repos","events_url":"https://api.github.com/users/glennfu/events{/privacy}","received_events_url":"https://api.github.com/users/glennfu/received_events","type":"User","site_admin":false},"created_at":"2015-09-11T14:55:23Z","updated_at":"2015-09-11T14:55:23Z","body":"I tried this:\r\n\r\n```\r\n    search = NetSuite::Records::InventoryItem.search({\r\n      preferences: {\r\n        body_fields_only: true,\r\n        page_size: 100\r\n      }\r\n    })\r\n```\r\n\r\nbut still got \"NoMethodError: undefined method `results' for false:FalseClass\" at page 160.\r\n\r\nYou mentioned an \" advanced item search and only return internalIds\". I tried to figure out what that meant, and after consulting the README the best I could come up with was this:\r\n\r\n```\r\n    search = NetSuite::Records::InventoryItem.search({\r\n      columns: {\r\n        'listAcct:basic' => [\r\n          'platformCommon:internalId/' => {},\r\n        ]\r\n      }\r\n    })\r\n```\r\n\r\nUnfortunately that doesn't work. I just see \"TypeError: no implicit conversion of Symbol into Integer\". Can you explain to me how to do what you're suggesting?"}}