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
New to NetSuite | How to access sublist data in a suitelet
Suitelets allow us to create custom pages within NetSuite. One of the common implementations for a suitelet is getting data from a user and then processing the data for display. To get and process the fields that are created in the suitelet, we use ServerRequest.parameters to access the values of the fields. A sublist can also be created in a suitelet. If we want to access the data that were entered in the sublist, how do we do it?
SuiteScript 2.x have 2 methods for that purpose - ServerRequest.getLineCount(options) and ServerRequest.getSublistValue(options). The former returns the total number of lines in a sublist while the latter returns the value of a specific sublist line item.
Tagged:
2