Discussions
Join the NetSuite community to innovate, connect, and discover what’s next.
SuiteWorld brings thousands of innovators, builders, and leaders together to learn, connect, and shape what’s next. This October, explore how to build a stronger foundation for growth through inspiring keynotes, major product reveals, hands-on sessions, and unforgettable moments—all in one place for our biggest event of the year. Register now
getItemAvailability returning: "An unexpected error occurred."
Hi,
getItemAvailability stopped working for me this past week, and I'm trying to track down the cause. Any call I make to getItemAvailability comes back with the message: "An unexpected error occurred."
Here is my Java code:
// Create item ref
RecordRef itemRef = new RecordRef();
itemRef.setInternalId( xRef.netSuiteInternalID() ); // This NS item exists
itemRef.setType( RecordType.inventoryItem );
// Create RecordRef list
RecordRef[] recordRefs = new RecordRef[1];
recordRefs[0] = itemRef;
RecordRefList recordRefList = new RecordRefList();
recordRefList.setRecordRef(recordRefs);
// Create item filter
ItemAvailabilityFilter itemAvailabilityFilter = new ItemAvailabilityFilter();
itemAvailabilityFilter.setItem( recordRefList );
GetItemAvailabilityResult result = port.getItemAvailability( itemAvailabilityFilter );
if ( !result.getStatus().isIsSuccess() ) {
throw new RuntimeException( "NetSuite Error: " + result.getStatus().getStatusDetail(0).getMessage() );