g_form.showErrorBox validation not working

shivanki1
Mega Expert

Hi All ,

We have upgraded our instance to Jakarta patch 4 and it seems the function g_form.showErrorBox() does not work anymore here .

The Error message used to get displayed earlier but now after the upgrade the function does not work.

Can someone help here . Please its urgent .

Thanks in Advance.

Regards,

Shivanki

1 ACCEPTED SOLUTION

Hi Shivanki,



It works for me.



g_form.showErrorBox("assigned_to","This is the error");


You can also use...


g_form.showFieldMsg("assigned_to","This is the error","error");


Thanks,


Berny


View solution in original post

9 REPLIES 9

bernyalvarado
Mega Sage

Hi Shivanki,



Have you checked if your browser console is displaying an error message? That error may be halting the client scripts and then causing your message to not come up.



Thanks,


Berny


Thanks for the Reply !




I have checked the browser console as well but no error message is there .


The question is the same script is working in helsinki but not in jakarta.


corina
ServiceNow Employee
ServiceNow Employee

Hello Shivanki.



Does showFieldMsg() work?



GlideForm - showErrorBox(String name, String message)


Hi Shivanki,



It works for me.



g_form.showErrorBox("assigned_to","This is the error");


You can also use...


g_form.showFieldMsg("assigned_to","This is the error","error");


Thanks,


Berny