- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-05-2022 01:21 AM
In Glide Form API, the method g_form.addFormMessage(String message, String type) is not working properly. When I am using this method without g_form, it's giving correct output in the form. Why is it so happening?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-05-2022 01:33 AM
Hi,
addFormMessage is part of some UI scrips/pages and, for that reason, the function gets loaded into the page (as an example, the "Add to Visual Task Board" has that function). I don't believe it is intended to work with g_form.
Looking at the scripts where we can find it, it uses GlideUI call:
GlideUI.get().addOutputMessage({msg: msg, type: type, id: id});
I hope the above helps!
Pedro
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-05-2022 01:33 AM
Hi,
addFormMessage is part of some UI scrips/pages and, for that reason, the function gets loaded into the page (as an example, the "Add to Visual Task Board" has that function). I don't believe it is intended to work with g_form.
Looking at the scripts where we can find it, it uses GlideUI call:
GlideUI.get().addOutputMessage({msg: msg, type: type, id: id});
I hope the above helps!
Pedro
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-05-2022 01:43 AM
Hi Sushma ,
Please refer below article:
https://community.servicenow.com/community?id=community_article&sys_id=0b231b4bdb9c7308fff8a345ca961953
Regards,
Rajeev
Please mark it helpful if i have answered your query.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-05-2022 02:20 AM
Hi Sushma,
You can use g_form.addInfoMessage();
g_form.showFieldMsg();
Regards,
Rajeev