Changing the style of addInfoMessage, setFieldMsg, Variable 'More Information'

The SN Nerd
Giga Sage
Giga Sage

Hi All,

With the new themes in UI16 and the ability to customise them, the styling of the addInfoMessage etc boxes often do not align with the color scheme.

Is there a way to change that styles of all these across the entire toolset, in the cleanest way possible ? (ie. no client scripts, & dom hacks)

As you can see, purple and blue don't mix

Examples

Variable 'More information'

find_real_file.png

g_form.showFieldMsg()

find_real_file.png

g_form.addInfoMessage()

find_real_file.png


ServiceNow Nerd
ServiceNow Developer MVP 2020-2022
ServiceNow Community MVP 2019-2022
5 REPLIES 5

oharel
Kilo Sage

Hi Paul,


This does not really answer your question, but just so you have it for future reference:


https://www.servicenowguru.com/scripting/ui-info-error-message-cheat-sheet/



Also, you can add types of Annotations under System UI-> Form Annotation Types, which can add a nice touch sometimes.



harel



Edit:


Also found this, which might be what you are looking for: Re: addInfoMessage and this: Community Code Snippets - Logging: Some Notes on Business Rules


Judging by the silence of the community on this one, I guess I should probably raise an enhancement request for the ability to style these!



ServiceNow Nerd
ServiceNow Developer MVP 2020-2022
ServiceNow Community MVP 2019-2022

Have a look at this link Paul .Should solve your issue:



Community Code Snippets - Logging: Some Notes on Business Rules


***If Correct/Helpful please take time mark as Correct/Helpful. It is much appreciated.***

Regards

Paul

Also this link is cool:



How to Show Images in Info Messages in ServiceNow | SN Commander



It shows how to add images to the message also.


***If Correct/Helpful please take time mark as Correct/Helpful. It is much appreciated.***

Regards

Paul