Discussions
Join us for complimentary one-day events around the world and step into a future fueled by AI and limitless potential. Explore new breakthroughs, sharpen your skills, and connect with experts who are shaping what’s next. Experience bold keynotes, interactive learning, and connections that span the global NetSuite community. Discover what's next at SuiteConnect Tour 2026.
Searching for Customer by External ID
How do I search for a Customer using an External ID? It was easy in 2.5, but in 2.6, the CustomerSearchBasic class changed for ExternalID.
I've tried the following. When I run it, I get an error saying 'searchValue not found'. That makes sense since there is no comparator (is, anyof, etc.) But how do I apply that when CustomerSearchBasic only wants a RecordRef[] for the ExternalId?
CustomerSearch custSearch=new CustomerSearch();
CustomerSearchBasic customerSearchBasic = new CustomerSearchBasic();
custSearch.setBasic(customerSearchBasic);
RecordRef[] values=new RecordRef[1];
values[0]=new RecordRef();
values[0].setExternalId(userID.toString());
customerSearchBasic.setExternalId(values);
SearchResult result=port.search(custSearch);