g_form.showErrorBox and showFieldMsg do not work at Service Portal
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-10-2018 11:36 AM
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-10-2018 01:04 PM
Hello Qili
I tried your script and seems to be working for me. Would you mind putting some alert statements in the script and see if the script is working. I would also suggest you to use a different browser and see if that makes any difference. PFA
Please mark my response as correct and helpful if it helped solved your question.
-Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-12-2018 05:59 AM
Hi
I realized that g_form.showfieldmsg does not work on the label, but it works on other type of the question. Thank you.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-22-2020 08:23 PM
This reply was helpful for me but also do you have any idea how to translate the g_form.showfieldmsg to different language, i am badly stuck there.
Thanks and Regards,
Prerana
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-10-2018 12:13 PM
I don't see any error in console when i this client script runs

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-10-2018 12:44 PM
Hi Qili,
In service portal use showFieldMsg() function with below syntax:
g_form.showFieldMsg('<variable_name>', 'msg', 'info', false);
Thanks,
Harish