Jul 26 2017
Posted By : aecc
The Sublists display relevant data as the list view on the record.If you are working with NetSuite, you must quite familiar with this.For example, on the Sales Order Record, the Item Sublist lists all the items on this Sales Order to be sold to the customer, and on Invoice Record, the Accounting Books Sublist contains the information for different Account Books if you’re using the Multi-Book Accounting Feature in NetSuite.
If you’re creating the Custom Records, NetSuite gives a way that adding Custom Sublist on to them.This Beginning with creating a Saved Search. Note that you cannot create a free running sublist on the Custom Record. The content of the Sublist on the Custom Record always comes from a Saved Search.
I’ll use a simple example to demonstrate how to add the sublist onto a Custom Record.
There is a Custom Record called Container, all the Purchase Orders come from this container is linked to it by adding the container to a custom field on the Purchase Order. Then we want to display the linked Purchase Orders as a Sublist on each Container Record.
Let’s Start to build a Saved Search.
To build a Saved Search to be used in the Custom Record Sublist, go to the Report -> Saved Search -> New. Here we have a Transaction search since the Purchase Order is a transaction record in NetSuite. We define the searching criterias and columns as usual. We add filters to display only Purchase Order type and the record must not be Voided. Then we check the “AVAILABLE AS SUBLIST VIEW” Box.
The next step is to add Available Filters, for the Saved Search to be used in Sublist, at least one Available Filter of a List/Record type Must be added. System will use this filter to filter out the Purchase Orders for different containers. So we add an Available Filter “Container”.
Then we can go to the Container Record to add the Sublist. On the Custom Record Type – Container page, go to the Sublist Tab, in the Search Field, choose the Saved Search We just created and give it a Label Name.
The setup is done, the Sublist is added to the Container Custom Record to display all the linked Purchase Orders related to the current Container Record.
How to create a button in NetSuite to open a saved search result
How to Prevent User from Editing the Record — Using Client Side Script.
Include Custom Module in NetSuite 2.0 Script.
Overcome saved search each() function limitation
Working with Subrecord on SuiteScript