Error style not working in UI Policy Action

andrespinilla
Tera Contributor

Hey team,

 

I'm trying to create a UI Policy Action to display an error message but for some reason it is not displaying the message with the red background. However, when I use warning or info the backgrounds yellow and blue work.

 

Does anybody know how to fix this issue?

5 REPLIES 5

Bhuvan
Kilo Patron

@andrespinilla 

 

Can you share screenshot of UI policy that is not working as expected ?

 

If this helped to answer your query, please mark it helpful & accept the solution.

 

Thanks,

Bhuvan

@andrespinilla 

 

You can use below knowledge article for troubleshooting

 

https://support.servicenow.com/kb?id=kb_article_view&sysparm_article=KB0547063

 

If this helped to answer your query, please mark it helpful & accept the solution.

 

Thanks,

Bhuvan

HanuBhagav
Mega Contributor

hi @andrespinilla ,


Please try to use one of below methods:
g_form.addErrorMessage('Form Error Message Text');

//Field error message
g_form.showFieldMsg('impact','Priority is high!','error');


Also Check if there any Client Scripts which take priority Over UI Policy.

Thanks & Regards,
Hanu


Shubhras
Tera Contributor

@andrespinilla 

 

  • UI Policy Actions don’t support red error banners → only Info (blue) and Warning (yellow).

  • For red background error messages, you must use Client Scripts with g_form.showFieldMsg() or g_form.addErrorMessage().

Thanks,

Shubhra Saxena