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.
New AI Community Guidelines. Please review and follow them to ensure AI use stays safe, accurate, and compliant.
Keep an eye out for upcoming NetSuite events, including meetups, workshops, and webinars. These sessions are a great way to connect with peers, learn from experts, and stay current on the latest NetSuite updates and best practices. Registration links are provided in each event.
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