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
07-22-2020 11:11 PM
Yes, i missed it and thank you so much.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-20-2021 02:23 AM
If anyone is still looking for the answer...here it is.
Use the below code in client script to work in both Console & Portal. We have to use call back function.
getMessage("--Your Message Key--", function(msg) {
g_form.showFieldMsg('state', msg, 'info', false);
});
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-06-2023 02:35 AM
You should clear the Field Name first and then show Error Message. Try this below.
g_form.clearValue("field name");
g_form.showFieldMsg("field name","error message","error")
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-11-2023 05:22 AM
Thanks!
This is working, but any idea about why so?