- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-16-2022 04:05 AM
Hi Every one!!!!
I created one new button "plan document team request" in incident form I want to add 'blue' color for the button
I am trying with this code but I couldn't
function onLoad() {
changeButtonColor('plan_document_team_request', '#0000FF');
}
function changeButtonColor(buttonID, backgroundColor) {
try {
//Find the button(s) by ID and change the background color
$$('button[id=' + buttonID + ']').each(function(elmt) {
elmt.style.backgroundColor = backgroundColor;
elmt.style.color = '#ffffff'; //make the button text white
});
}catch(e){}
}
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-16-2022 08:06 AM
@APV Babu Add one more css for bottom button just like
#plan_document_team_request_bottom {
//Add the color as you added for up button
}
Please mark as correct answer if this solves your issue.
ServiceNow Community Rising Star, Class of 2023
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-16-2022 04:10 AM - edited 12-16-2022 04:10 AM
Hi @APV Babu ,
Check this article:
https://support.servicenow.com/kb?id=kb_article_view&sysparm_article=KB1004974
Also:
Regards,
Reshma
**Please mark my answer correct or helpful based on the impact**
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-16-2022 05:19 AM
I changed color code but its not working
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-16-2022 05:38 AM
@APV Babu You are trying to do it with DOM manipulation. That's not recommended by ServiceNow. You can use the class defined in the UI Action itself.
If at all you want other colors then please try below link
https://support.servicenow.com/kb?id=kb_article_view&sysparm_article=KB1004974
Please mark as correct answer if this solves your issue.
ServiceNow Community Rising Star, Class of 2023
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-16-2022 07:29 AM
@jaheerhattiwale Thanks for reply🤝
I am getting color only on the top button, but not in the bottom