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
05-20-2020 07:32 AM
thanks, that worked
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-30-2018 11:52 AM
showErrorBox and showFieldMsg do not work in the portal in Istanbul.
Using addErrorMessage and addInfoMessage instead works fine for that version.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-07-2019 05:57 AM
I had the same issue recently where the g_form.showFieldMsg(..) was not displaying the message on portal.
If you try to clear the value using g_form.clearValue(..) straight after the g_form.showFieldMsg(..) it will not display the error message.
Instead clear the value prior to displaying the error message.
This does not work!
g_form.showFieldMsg('contract_end_date','Pleaase select a date which is in the future.','error');
g_form.clearValue('contract_end_date');
Solution
g_form.clearValue('contract_end_date');
g_form.showFieldMsg('contract_end_date','Pleaase select a date which is in the future.','error');
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-31-2020 08:40 AM
Hi,
Thanks for the solution.
But the message is displayed and disappearing immediately.
_Kumar

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-02-2020 09:00 AM
I suggest opening a new "question" on this. you'll get more eyes on the issue as you're likely only getting folks who've "Subscribed" to this question by replying or pressing the "subscribe" button.
It sounds like you might have the method to clear field messages happening after you set it. You'll to clear the field messages before your change occures because then one error will show up. Good luck.