sorry, actually a subtab
# suitescript
j
sorry, actually a subtab
j
in a beforeLoad, grab the form from context, get the sublist you want, set its displayType property to hidden.
Copy code
define(['N/ui/serverWidget'], function(ui) {

	const beforeLoad = (context) => {
		const form = context.form;
		form.getSublist({id: '[sublist_id]'}).displayType = ui.SublistDisplayType.HIDDEN;
	}

	return: {
		beforeLoad: beforeLoad
	}
})
Read your question wrong. Sorry. This will hide a sublist, but not a subtab. My apologies.