- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-17-2024 02:04 AM - edited 12-17-2024 02:05 AM
How to highlight the Additional Comment journal field Label with red color incident form.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-21-2025 03:31 AM
Hope you are doing good.
Did my reply answer your question?
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-17-2024 03:30 AM
- The additional comment's text Font and text Color are changed in tokyo upgrade when compared with Sandiego.
- Font color for Polaris theme is changed at base level 'css_includes_ng_polaris.cssx' in Tokyo version. This looks to be an intentional change to avoid passing a static color and instead apply color based on the color variables.
Refer this KB: https://support.servicenow.com/kb?id=kb_article_view&sysparm_article=KB1296262
If my response helped, please mark it as the accepted solution ✅ and give a thumbs up👍.
Thanks,
Anand
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-17-2024 04:04 AM
is it a business requirement to change the label for that field?
try this and ensure the Isolate Script field is False
function onLoad() {
// Get the label element for the Additional Comments field
var label = document.querySelector('label[for="incident.comments"]'); // Adjust the selector based on your field's name
if (label) {
label.style.color = 'red';
}
}
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-17-2024 04:19 AM
this worked for me with DOM manipulation
Ensure Isolate Script field is False so that DOM works
setTimeout(function(){
$j("span:contains(" + 'Additional comments'+ ")").each(function () {
$j(this).css('color', 'red'); //mark the content
});
}, 5000);
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-17-2024 06:16 AM
Hello @Ankur Bawiskar ,
The code is changing the color for all activity field. Shown below. I only want for additional comment
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-17-2024 06:42 AM
this worked for me and it added color only for Additional comments
setTimeout(function(){
$j("label:has(span:contains('Additional comments (Customer visible)'))").each(function() {
// Code to execute for each label containing a span with specific text
$j(this).css('color', 'red'); // Example: change label color
});
}, 5000);
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader