Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

g_form.showErrorBox and showFieldMsg do not work at Service Portal

qqj5004
Kilo Contributor

Hi all

the onLoad Client Script with g_form.showErrorBox or g_form.showFieldMsg   do not work in Service Portal.

function onLoad() {

  var msg = 'check at lease one checkbox';

if(g_form.getValue("add_user", false)){

g_form.showErrorBox('right', msg);

}

}

This script work on CMS but not on Service Portal

Please Help!!!

Thank you

15 REPLIES 15

M_ Green
Kilo Contributor

Perfect.. did the trick for me, thanks 🙂