Discussions
Stay up-to-date with the latest news from NetSuite. You’ll be in the know about how to connect with peers and take your business to new heights at our virtual, in-person, on demand events, and much more.
Now is the time to ask your NetSuite-savvy friends and colleagues to join the NetSuite Support Community! Refer now! Click here to watch and learn more!
Stay in the Know
Be sure you're subscribed to NetSuite communication to stay in the know about monthly happenings, updates and announcements. Subscribe
Be sure you're subscribed to NetSuite communication to stay in the know about monthly happenings, updates and announcements. Subscribe
SerializedInventoryItemLocations.serialNumbers is always null
I'm trying to find a way to retrieve the serial numbers for a specific location for a specific item. After browsing the schema browser and then doing some intellisense exploring I found what I thought was the correct way:
(this is just testing code in a "test bench" application)
private void button5_Click(object sender, EventArgs e) { NSWSService service = NSWSService.Instance; SerializedAssemblyItem item = service.GetRecord<SerializedAssemblyItem>(null, "520", RecordType.serializedAssemblyItem); if (item != null) { foreach (SerializedInventoryItemLocations location in item.locationsList.locations) { Console.WriteLine("Item 520, Location {0}", location.location); if (String.IsNullOrEmpty(location.serialNumbers)) { continue; } string[] serialNumbers = location.serialNumbers.Split( new char[] { ',' }); foreach (string serialNumber in serialNumbers) { Console.WriteLine("t{0}", serialNumber); } } } } Steve Klett | Senior Developer
NetValue Technology
0