g_form.showFieldMsg not working
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-20-2018 08:01 PM
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!
- Labels:
-
Service Portal Development

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-20-2018
08:21 PM
- last edited on
01-24-2024
06:27 PM
by
ServiceNow
can you paste your full script?
adding thread here. kindly refer that.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-21-2023 06:51 AM
Could younhelp on this scenario
Here am getting alert msg but g_form msg not triggering
if (!/^[a-z]+$/.test(newValue))
///^[0-9*#+]+$/
{
alert(" name should be lower case ");
g_form.showErrorBox('u_name', 'name should be lower case',false);
g_form.showFieldMsg('u_name', 'name should be lower case','info',false);
g_form.clearValue('u_name');
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-06-2023 02:33 AM
try Clearing the value first and then display error message then it will work. try in this format.
g_form.clearValue('u_name');
g_form.showFieldMsg('u_name', 'name should be lower case', 'info');
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-30-2023 11:07 PM
moving clearValue before showFieldMsg fixed my problem, thanks heaps