Has anyone found a way to change a tab title? Woul...
# general
p
Has anyone found a way to change a tab title? Would like to include the sales order number in the tab title - preferably in the beginning.
1
m
I've done this with a scripted inline html field, here's a quick and dirty example (added in
beforeLoad
):
Copy code
var recordNumber = context.newRecord.getValue({'fieldId':'tranid'});
var fldPageTitleHTML = context.form.addField({
	'id':'custpage_page_title_html',
	'type':serverWidget.FieldType.INLINEHTML,
	'label':'Page Title HTML'
});
fldPageTitleHTML.defaultValue = '<script>top.document.title=\'' + recordNumber + ' - NetSuite (Company Name)\'</script>';
👍 1
You may want to filter it to not run in create or copy since the
tranid
field won't have any value in those contexts.
👍 2
p
Nice. Thanks!
👍 1