darrenhillconsulting
04/07/2026, 5:56 PMCeligo AI
04/07/2026, 5:56 PMAI generated answer (using internal Slack threads):To hide a sublist in a beforeLoad User Event (UE) script in NetSuite, you can use the
removeSublist method of the N/currentRecord module. This method removes a sublist from the current record.
Here is a sample code snippet:
javascript
function beforeLoad(context) {
if (context.type !== context.UserEventType.CREATE)
return;
var form = context.form;
form.removeSublist({
id: 'sublistId' // replace 'sublistId' with the id of your sublist
});
}
Please replace 'sublistId' with the actual ID of your sublist. This code will remove the sublist from the form when a new record is being created. If you want to remove the sublist in other scenarios (e.g., when editing a record), you can adjust the condition in the if statement.
Remember, this will remove the sublist entirely. If you want to hide specific fields on the sublist, you can use the getField method to get a reference to the field and then use the updateDisplayType method to hide it.
******
Disclaimer:
This response was generated by an artificial intelligence assistant based on previous conversations from multiple Slack channels, and may contain inaccuracies or mistakes.
******Celigo AI
04/07/2026, 5:56 PMSlack thread 1: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.829345703
Slack thread 2: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.828674316
Slack thread 3: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.827270567
Celigo AI
04/07/2026, 5:56 PM