如何使用 java api 使用自定义字段作为条件创建 Netsuite 客户搜索?

How to create a Netsuite customer search using the custom field as the criteria using the java api?

我正在尝试使用已填充的自定义 ID 在 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);

别介意此代码按原样工作..