Where can I find the default color of Infomessage

JohnnySnow
Kilo Sage

Hi Team,

 

I'm trying to figure out where does the default color for gs.addinfoMessage(), gs.addErrorMessage() comes from? Themes?

Any idea?

 

Thanks
Johnny

Please mark this response as correct or helpful if it assisted you with your question.
1 ACCEPTED SOLUTION

JohnnySnow
Kilo Sage

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.

 

Thanks
Johnny

Please mark this response as correct or helpful if it assisted you with your question.

View solution in original post

6 REPLIES 6

Yashsvi
Kilo Sage

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:

https://www.servicenow.com/community/itsm-forum/how-to-change-background-color-for-info-message/td-p...

 

Thank you, please make helpful if you accept the solution.

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?

Thanks
Johnny

Please mark this response as correct or helpful if it assisted you with your question.

Hi @JohnnySnow,

please check below link:

https://www.youtube.com/watch?v=D0JMCbEA5YM

Thank you, please make helpful if you accept the solution.

Scripting scenario to implement INCREASE FONT size in display message (addInfoMessage addErrorMessage) Questions: #howto #workassignment #learningcoding #coding #servicenow #hiring #jobs #jobsearch #jobvacancy #jobvacancies #google #accenture #itjobs #salesforce #ibmjobs #oflatest #sapiens #hcl ...

Ankur Bawiskar
Tera Patron
Tera Patron

@JohnnySnow 

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.

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader