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
A better way to iterate sublist/data?
I'm giving SS2.0 another try and want to make sure I'm not missing something. I'm sure with the whole redesign of the API, all these objects they've introduced... surely there must be a more elegant way to iterate over sublist data that this:
var itemCount = _record.getLineCount({ sublistId: 'item' }); // Get all the ids of the items var itemIIds = []; for(var i = 0; i < itemCount; i++) { itemIIds.push(_record.getSublistValue({ sublistId: 'item', fieldId: 'item', line: i })) }I see the record.Sublist type but it lacks any line data access. I see the same old methods on the Record type that were there in SS1.0. Is it true that we don't have a modern way to access sublist data? Something like this (pseudo code) would be refreshing:
Steve Klett | Senior Developer
NetValue Technology
0