As a SuiteScript Developer, have you had a chance to work on NetSuite suitelets?
Have you had a SuiteScript requirement of a suitelet with two sublists?
You might notice that by default, NetSuite displays these sublists in subtabs, like below:

In a NetSuite user perspective, this is not ideal as it will require a step for them to click on the subtab.
The solution is to add a tab and put these sublists inside the tab. Notice that we used the form.addSubtab API.
Here’s the sample code:
var mainTab = form.addSubtab({ id: 'custpage_main_tab', label: "Main Tab" }); var sublist1 = form.addSublist({ id: 'custpage_sublist_1', type: ui.SublistType.LIST, label: 'Sublist 1', tab: 'custpage_main_tab' }); sublist1.addField({ id: 'custpage_fld1', type: ui.FieldType.TEXT, label: 'Field 1' }); var sublist2 = form.addSublist({ id: 'custpage_sublist_2', type: ui.SublistType.LIST, label: 'Sublist 2', tab: 'custpage_main_tab' }); sublist2.addField({ id: 'custpage_fld2', type: ui.FieldType.TEXT, label: 'Field 2' });
Here’s the final output. As you can see Sublist 1 and Sublist 2 are not displayed in separate subtabs but are shown horizontally:

Hope this helps you in some way! For more information about suitelets, please refer to the Help Guide.
Want more SuiteScript 2.0 code examples? Go to this link!
LEACC Consulting is a team of NetSuite Certified Developers with IT experience solely dedicated to NetSuite technologies for eight years. We are experts in both SuiteScript 2.0 and SuiteScript 1.0. Our team has worked with 400+ NetSuite scripts and workflows combined. If you need some consulting help of how you can design your NetSuite scripts better, contact us by filling out this form or by commenting below.
Do you have NetSuite Development needs? Do you need help with a solution like this? Click on the link below and let’s have a chat about your project requirements!
Contact us for your NetSuite needs!