Skip to content

Instantly share code, notes, and snippets.

@havana59er
Created January 30, 2013 17:44
Show Gist options
  • Save havana59er/4675063 to your computer and use it in GitHub Desktop.
Save havana59er/4675063 to your computer and use it in GitHub Desktop.
How to get Custom List Values from NetSuite Web Services. This example uses CXF.
NetSuiteService service = new NetSuiteService();
NetSuitePortType proxy = service.getNetSuitePort();
proxy.login(loginRequest);
RecordRef recordRef = new RecordRef();
recordRef.setInternalId(CUSTOM_LIST_INTERNAL_ID);
recordRef.setType(RecordType.CUSTOM_LIST);
GetRequest request = new GetRequest();
request.setBaseRef(recordRef);
ReadResponse result = proxy.get(recordRef).getReadResponse();
CustomList licenseAgreementTypeList = (CustomList)result.getRecord();
Map<String, String> cache = new HashMap<String, String>();
for (CustomListCustomValue value : licenseAgreementTypeList.getCustomValueList().getCustomValue()) {
cache.put(value.getValue(), value.getValueId().toString());
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment