How can I highlight a Related List Tab?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-27-2019 02:24 PM
In an effort to make our Change Request Default view more user friendly, the Change Process Manager wants the Related list tabs to be highlighted in some way (different font color or different background color or bold font) when they aren't empty. We realize they already display a record count when they aren't empty, but want something more eye-catching. And we know they can be hidden when empty, but we need them to not be hidden so related records can be added. Does anyone know a way to do this that won't deviate too far from OOB and become a maintenance nightmare?
Thanks for the help, Reed

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-27-2019 02:44 PM
Following link should help
Please mark this response as correct or helpful if it assisted you with your question.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-29-2019 10:44 AM
Thanks for the information. And the script does work to indiscriminately change the tab color. I only want to change the tab color for related lists that are not empty. So the missing piece is: How check which tabs have records? I did some trial-and-error and haven't yet found a way to do it.
Thanks.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-27-2019 03:05 PM
You can achieve this by writing a on load client script on your table:
Script:
function onLoad() {
//Type appropriate comment here, and begin script below
var tabs = document.getElementsByClassName('tabs2_tab');
tabs[0].style.backgroundColor = 'red';
tabs[1].style.backgroundColor = 'green';
tabs[2].style.backgroundColor = 'orange';
tabs[3].style.backgroundColor = 'blue';
tabs[4].style.backgroundColor = 'yellow';
}
section numbers starts from 0. Replace the tab number with your required number to add color to that particular tab/section.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-29-2019 10:44 AM
Thanks for the information. And the script does work to indiscriminately change the tab color. I only want to change the tab color for related lists that are not empty. So the missing piece is: How check which tabs have records? I did some trial-and-error and haven't yet found a way to do it.
Thanks.