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.
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