Hi All,
I have been working away on my first application for web services and just as I thought I was nearly through stage one of updating our web site with data from NetSuite, I realized that not all "items" are returned by my search. We have lots of Assembly Items.
I'm worried because I now realize that the documentation keeps referring to InventoryItems and in NetSuite itself Assembly, Item Group and Inventory Item are separate things under Item. Hope springs eternal, so I though I'd ask.
Below is code, if anyone else has retrieved Assemblies or Groups I'd love to hear it.
The real goal is to pass orders from the web back to NetSuite, and I'm hoping that assembly items can be added to a SalesOrder, though I haven't gotten that far yet.
Thanks..Don
/// <summary> Grabs all inventory items from netsuite /// </summary> private Record[] getAllItemList() { RecordRef[] rr; //= new RecordRef[]{new RecordRef("1", RecordType.new RecordRef("2", RecordType.customer), new RecordRef("RecordType.customer)}; ItemSearchBasic itemsearchbasic = new ItemSearchBasic(); SearchStringField itemsearchname = new SearchStringField(); itemsearchname.searchValue = "CDAH0"; //limit to small group for testing itemsearchname.@operator = SearchStringFieldOperator.startsWith; itemsearchname.operatorSpecified = true; itemsearchbasic.name = itemsearchname; SearchPreferences sprefs = new SearchPreferences(); sprefs.bodyFieldsOnly = false; //needed to get price info this.ns_service.searchPreferences = sprefs; set_sErrorText("Start search"); // Invoke search() web services operation SearchResult response = ns_service.search(itemsearchbasic); // Process response if (response.status.isSuccess) { return response.recordList; } else { set_sErrorText("Search error " + getStatusDetails(response.status)); return null; } }