4D QuickBooks Integrator: How can I get a list of customers?


How do I get a list of customers from QuickBooks?

The ObjSearch object can be used to perform queries of specific types. For Customers, you can set the QueryType to qtCustomer (12). Below is some sample code (Java) to accomplish this:

Objsearch objsearch1 = new Objsearch(); objsearch1.setQueryType(objsearch1.qtCustomerSearch); objsearch1.search();

After the search, the results will be contained in the results collection. XML response aggregates can be assigned to an instance of Customer to parse into further details.

for (int i = 0; i < objsearch1.getResults().size(); ++i) { customer1.reset(); customer1.setQBResponseAggregate(objsearch1.getResults().item(i).getAggregate()); //perform additional queries on customer here }

We appreciate your feedback. If you have any questions, comments, or suggestions about this entry please contact our support team at support@4dpayments.com.