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.
New AI Community Guidelines. Please review and follow them to ensure AI use stays safe, accurate, and compliant.
Keep an eye out for upcoming NetSuite events, including meetups, workshops, and webinars. These sessions are a great way to connect with peers, learn from experts, and stay current on the latest NetSuite updates and best practices. Registration links are provided in each event.
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