g_form.showFieldMsg not working

alex_tan
Kilo Contributor

Hi All,

I am encountering an issue now where g_form.showFieldMsg("field name","error message","error") is not loading error message in London Service Portal for a onChange Catalog Item client script.

Would like to seek advice on this issue.

Thanks a lot for your help!

28 REPLIES 28

Yes, i missed it and thank you so much.

sarathc
Tera Contributor

If anyone is still looking for the answer...here it is.

Use the below code in client script to work in both Console & Portal. We have to use call back function.

getMessage("--Your Message Key--", function(msg) {
g_form.showFieldMsg('state', msg, 'info', false);
});

Reddy Sekhar
Tera Contributor

You should clear the Field Name first and then show Error Message. Try this below.

 

g_form.clearValue("field name");

g_form.showFieldMsg("field name","error message","error")

 

 

Thanks!

This is working, but any idea about why so?