1
我正嘗試通過使用已填充的自定義ID在Netsuite中查找客戶。我寫了一些代碼,結果沒有得到客戶。相反,我沒有收到任何記錄。我究竟做錯了什麼?如何使用自定義字段作爲使用java api的條件創建Netsuite客戶搜索?
public SearchResult searchCustomerbyExternalId(String externalID) throws RemoteException {
CustomerSearch customerSrch = new CustomerSearch();
CustomerSearchBasic customerSrchBsc = new CustomerSearchBasic();
SearchStringCustomField custentity_externalid = new SearchStringCustomField();
custentity_externalid.setInternalId("1015");
custentity_externalid.setSearchValue(externalID);
custentity_externalid.setOperator(SearchStringFieldOperator.is);
SearchCustomFieldList searchCustomFieldList = new SearchCustomFieldList();
SearchCustomField[] SearchCustomFieldArray = {custentity_externalid};
searchCustomFieldList.setCustomField(SearchCustomFieldArray);
customerSrchBsc.setCustomFieldList(searchCustomFieldList);
customerSrch.setBasic(customerSrchBsc);
SearchResult searchResult = _service.search(customerSrch);
別說這個代碼工作是...... – pitchblack408 2015-02-17 22:23:30
你贏了這一次! – 2015-05-20 00:25:29