ResultSet Object Members
Explore ResultSet object members in SuiteScript, enabling effective handling of search results in NetSuite applications.
The ResultSet object in the N/search module allows developers to manage and process search results effectively, enabling seamless interaction with large datasets. This object provides essential methods and properties to iterate through sets of search results, making it highly beneficial for applications requiring data analysis or duplication checks.
What is the ResultSet Object?
The ResultSet object encapsulates a collection of search results returned by the Search.run() method. It allows developers to perform operations on the results returned from on-demand or saved searches created using the N/search module.
ResultSet Object Members
The ResultSet object includes the following notable members:
| Member Type | Name | Return Type | Supported Script Types | Description |
|---|---|---|---|---|
| Method | ResultSet.each(callback) | void | Client and server scripts | Invokes a developer-defined function for each row in the search results, processing up to 4000 results at a time. |
| Method | ResultSet.getRange(options) | search.Result[] | Client and server scripts | Retrieves a slice of search results, providing an array of Result objects. |
| Property | ResultSet.columns | search.Column[] | Client and server scripts | Represents the columns included in the search results, allowing access to column definitions. |
The ability to paginate and filter search results through the ResultSet object is crucial for performance optimization when dealing with large sets of data.
Practical Use Cases
- Iterating through Results: Use the
eachmethod to process each result during a search operation. - Fetching Specific Ranges: Utilize
getRangeto obtain only the relevant slices of data needed for particular computations or displays.
Important Considerations
- The N/search module and its associated methods, including the ResultSet object, are not functional in unauthenticated client-side contexts. Ensure that you operate within authenticated environments to utilize these tools effectively.
By leveraging the ResultSet object, developers can efficiently manage large sets of data retrieved from NetSuite searches, enhancing both performance and user experience in applications.
Source: This article is based on Oracle's official NetSuite documentation.
Key Takeaways
- The ResultSet object is essential for managing search results in NetSuite.
- It provides methods for iterating through up to 4000 results at a time.
- Use
getRangeto obtain specific result slices as needed. - The N/search module requires authenticated contexts to function correctly.
Frequently Asked Questions (4)
Can the ResultSet object be used in unauthenticated client-side scripts?
How does the ResultSet.each method handle large datasets?
What is the function of the ResultSet.getRange method?
What types of scripts support the ResultSet object members?
Was this article helpful?
More in General
- Payment Date Prediction Feature in NetSuite
Payment Date Prediction in NetSuite utilizes machine learning to enhance financial planning by predicting invoice payment dates.
- NetSuite Ship Central Enhancements for Packing & Shipping
NetSuite Ship Central features enhance packing and shipping operations for improved efficiency and accuracy.
- Generative AI Features in NetSuite 2026.1
Discover new generative AI features in NetSuite 2026.1, enhancing reporting, search, predictions, and development productivity.
- Field Service Management Enhancements and Bug Fixes for 2026
Overview of the 2026 Field Service Management SuiteApp updates showcasing enhancements and bug fixes.
Advertising
Reach General Professionals
Put your product in front of NetSuite experts who work with General every day.
Sponsor This Category