Discussions
Join us for complimentary one-day events around the world and step into a future fueled by AI and limitless potential. Explore new breakthroughs, sharpen your skills, and connect with experts who are shaping what’s next. Experience bold keynotes, interactive learning, and connections that span the global NetSuite community. Discover what's next at SuiteConnect Tour 2026.
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() );