Discussions
Stay up-to-date with the latest news from NetSuite. You’ll be in the know about how to connect with peers and take your business to new heights at our virtual, in-person, on demand events, and much more.
Now is the time to ask your NetSuite-savvy friends and colleagues to join the NetSuite Support Community! Refer now! Click here to watch and learn more!
Stay in the Know
Be sure you're subscribed to NetSuite communication to stay in the know about monthly happenings, updates and announcements. Subscribe
Be sure you're subscribed to NetSuite communication to stay in the know about monthly happenings, updates and announcements. Subscribe
get Customer Cases not closed
I need to perform search based on Customer internal id and where status is not closed. The following code returns all cases (including status equal "Closed"). Why ???
static SearchResult getCustomerCasesById(NetSuiteService service, string iternalId) { SupportCaseSearch casesearch = new SupportCaseSearch(); SearchMultiSelectField sm = new SearchMultiSelectField(); sm.@operator = SearchMultiSelectFieldOperator.anyOf; sm.operatorSpecified = true; sm.searchValue = new RecordRef[1]; sm.searchValue[0] = new RecordRef(); sm.searchValue[0].internalId = iternalId; CustomerSearchBasic csb = new CustomerSearchBasic(); csb.internalId = sm; casesearch.customerJoin = csb; SearchMultiSelectField status = new SearchMultiSelectField(); status.@operator = SearchMultiSelectFieldOperator.noneOf; status.operatorSpecified = true; status.searchValue = new RecordRef[1]; status.searchValue[0] = new RecordRef(); status.searchValue[0].name = "Closed"; status.searchValue[0].internalId = "5"; status.searchValue[0].type = RecordType.account; IssueSearchBasic isb = new IssueSearchBasic(); isb.status = status; casesearch.issueJoin = isb; // perform case search based on Case Id where status is not closed... return service.search(casesearch); } 0