REQUIREMENT
Need to hide a specific tab from a custom record.
SOLUTION
Use the following code snippet in user event script to hide the tab from the custom record and thereby it hide the corresponding sublist.
let inlineField = scriptContext.form.addField({
id: 'custpage_inline_field1',
type: 'INLINEHTML',
label: 'Button1'
});
let scr = '<script>jQuery( document ).ready(function(){jQuery("#custom195txt").hide();})</script>'
inlineField.defaultValue = scr