ANS-0430 · INVENTORY & ITEM MANAGEMENT

How to Retrieve Related Items for a NetSuite Item Record?

NetSuite's standard saved search functionality does not directly expose related item sublists, necessitating a SuiteScript approach for data access.

Short answer

To access an item's related items in NetSuite, direct retrieval via saved search is not possible because the 'presentationitem' sublist is not exposed. The recommended method involves using SuiteScript to programmatically count or interact with the related items associated with a specific item record, leveraging its internal ID.

Scenario

Users frequently need to identify or quantify the related items linked to a primary item record within NetSuite. While saved searches are a primary tool for data extraction, the specific sublist containing related items is not directly accessible through standard saved search criteria or results, posing a challenge for reporting and custom integrations.

Solution

NetSuite's saved search functionality does not allow direct access to the 'Related Items' sublist on the results tab of an item record. Therefore, a programmatic approach using SuiteScript is required to retrieve this information. The internal ID for the 'Related Items' sublist is presentationitem. While this sublist is not typically documented in the NetSuite record browser for direct access, it can be interacted with via SuiteScript. For example, to get the number of related items for a current item record in SuiteScript 2.x, one would use the following function:

currentRecord.getLineCount('presentationitem')

This function returns the total count of related items associated with the item currently being processed or viewed.

Expert NetSuite Support

Need help with this NetSuite issue?

Inventory & Item Management consulting and configuration support

Talk to a consultant