We've updated the ServiceNow Community Code of Conduct, adding guidelines around AI usage, professionalism, and content violations. Read more

To give an alert red color in the client script

SNow35
Giga Guru

Hi All,

I need to put an alert to a field which should be in red color. How can I give the text red color.

1 ACCEPTED SOLUTION

Kalaiarasan Pus
Giga Sage

Would this be enough?



g_form.addErrorMessage('This is an error');


View solution in original post

2 REPLIES 2

Mohammed Lais1
Mega Guru

Hi,


use this script.


g_form.showErrorBox('variable_name','message');


 


it will display in red color


Kalaiarasan Pus
Giga Sage

Would this be enough?



g_form.addErrorMessage('This is an error');