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
CustomerBasicSearch with AND
I'm trying to get records back that meet multiple criteria but it doesn't seem to be working. Can someone tell me what I am doing wrong?
Thanks
Jaime
CustomerSearchBasic custsearch_basic = new CustomerSearchBasic(); SearchStringCustomField websessionId = new SearchStringCustomField(); SearchStringCustomField webTerms = new SearchStringCustomField(); websessionId.internalId = "custentity_web_session_id"; websessionId.@operator = SearchStringFieldOperator.contains; websessionId.searchValue = "-"; websessionId.operatorSpecified = true; webTerms.internalId = "custentity_web_session_key_words"; webTerms.@operator = SearchStringFieldOperator.empty; webTerms.operatorSpecified = true; //RecordRef entitySearch = new RecordRef(); //entitySearch = new RecordRef(); //entitySearch.type = RecordType.customer; SearchCustomField[] searchEntities = new SearchCustomField[2]; searchEntities[0] = websessionId; searchEntities[1] = webTerms; custsearch_basic.customFieldList = searchEntities; service.searchPreferences = new SearchPreferences(); service.searchPreferences.bodyFieldsOnly = false; service.searchPreferences.pageSize = 100; service.searchAsync(custsearch_basic);
0