ShowFieldMsg in UI policies

servicenow14710
Tera Expert

Hello developers, I need to show field msg for a date field via ui polices on service portal, but the message is not displayed. Any suggestions is appreciated. Thanks!

9 REPLIES 9

_Gaurav
Kilo Sage

Hi @servicenow14710 
Did you mean while creating widgets or on the webform?
Can you share the code that you've written if possible?

Hi, it is on catalog form, i have used script execute if true-

function onCondition() {
    g_form.showFieldMsg('fieldName', 'error');
}

Hi @servicenow14710 
Use the below script and try
g_form.showFieldMsg("field name","error message","error");

Please mark this as helpful and accept it as a solution if this works for you.
Thanks!

Hi yes i tried   g_form.showFieldMsg("field name","error message","error");

g_form.showFieldMsg("field name","error message","error",'true');

msgs are not shown.