top of page

Customize Sublist to Hide Columns (NetSuite)

  • Writer: Kevin B.
    Kevin B.
  • Jul 19, 2023
  • 1 min read

Updated: Jul 31, 2023


NetSuite

This article was created for developers looking to make customizations to transactional record sublists. There is a need for new companies to condition their sublist in order to accurately view specific data. As a developer, we have the power to condition that view and only display certain fields that actually hold data. There is no need to display a column that has empty fields. This prevention alleviates the problem of infinite scrolling.


I know from personal experience when adding a new field to a sublist that unless there is unique customization of that list the user has to scroll to the far left to view that new field. This tutorial will help to resolve those issues.


Types of Sublist


There are four different types of sublists in NetSuite:

  • Editor

  • Inline Editor

  • List

  • Static List

Editor and Inline Editor are the most common of the sublist offered in NetSuite. Both sublists allow users or developers to add, edit, and remove lines, both support SuiteScript, and both require the same API calls.


Please click this link to view more information about Sublist Types.



In order to hide a column in a sublist I had to search through the documentation and I was able to construct a functional approach with conditioning by the user/role/department. Below is a code snippet of the method call hideColumnField that is available in the NetSuite documentation.


This script is User Event Script that runs a BeforeLoad method. I am conditioning the column removal based upon a user role and also the department they are associated with. The department conditioning will help to condition a view for a large group of users.


 

BeforeLoad Netsuite Function

---------------------------Here is the link to the hideColumnField method----------------------------------



Comments


NetSuite Source

©2023 by NetSuite Source. Proudly created with Wix.com

bottom of page