Created
January 30, 2013 17:44
-
-
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.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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