- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-18-2024 12:44 AM
Hi Team,
I'm trying to figure out where does the default color for gs.addinfoMessage(), gs.addErrorMessage() comes from? Themes?
Any idea?
Johnny
Please mark this response as correct or helpful if it assisted you with your question.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-19-2024 09:12 PM
Hello, few things..
1. I just saw that Yashsvi was mentioning g_form.addInfoMessage, whereas I was wondering about changing color of gs.addinfoMessage() (server side)
2. I was able to change the color of the message from Branding editor or through Portals>YourportalName>CSS section.
If you are doing through Branding editor it is the "Success" property color that you need to update. Also that property might be used in few other places, which you might need to check and do the change. In our case we were fine to go ahead and change that color.
Johnny
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
06-18-2024 12:55 AM
Hi @JohnnySnow,
There are additional message types that you can use:
g_form.addWarningMessage = yellow
g_form.addErrorMessage = red
g_form.addInfoMessage = blue
you can change the font color using the following script:
var message1 = 'TEST';var message2 = message1.fontcolor("red");g_form.addInfoMessage(message2);
You can also use text background high-lighting such as:
var message = '<b><p style="color:black;background-color:orange;">';message+='TEST';g_form.addInfoMessage(message);
or
var message = '<div style="background-color:blue;color:white">Assignment group changed.<br/>';g_form.addInfoMessage(message);
please check original post:
Thank you, please make helpful if you accept the solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-18-2024 12:58 AM
Hi @Yashsvi I'm aware of the changes that we can do using html but I was wondering where can I find the default values like you mentioned
g_form.addWarningMessage = yellow
g_form.addErrorMessage = red
g_form.addInfoMessage = blue
where is this mentioned/ or where is it coming from?
Johnny
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
06-18-2024 01:11 AM
Hi @JohnnySnow,
please check below link:
https://www.youtube.com/watch?v=D0JMCbEA5YM
Thank you, please make helpful if you accept the solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-18-2024 01:18 AM
I don't think you can change the default color as it comes from platform level
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