Discussions
Join the NetSuite community to innovate, connect, and discover what’s next.
SuiteWorld brings thousands of innovators, builders, and leaders together to learn, connect, and shape what’s next. This October, explore how to build a stronger foundation for growth through inspiring keynotes, major product reveals, hands-on sessions, and unforgettable moments—all in one place for our biggest event of the year. Register now
Search a Cutomer through API
Hi,
I am trying to search a Customer thanks to SOAP API on a basic field.
But I don't understand where my criteria has to be set...
Here is my snippet :
CustomerSearch customerSearch = new CustomerSearch();
SearchRequest sr = new SearchRequest();
sr.setSearchRecord(customerSearch);
SearchResponse searchResp = webService.search(sr);
List<Customer> customerList = new ArrayList<Customer>();
if(searchResp.getSearchResult().getStatus().isIsSuccess())
{
RecordList rl = searchResp.getSearchResult().getRecordList();
for(Record r : rl.getRecord())
{
Customer c = (Customer)r;
customerList.add(c);
System.out.println(c.getAccountNumber());
}
}