
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-31-2024 04:15 AM
Hi,
Looks like new methods have been added in Rome, but never used them, when I try to use them they are not working. Kindly help.
g_form.addFormMessage('Test', 'info');
g_form.clearFormMessages('info');
g_form.clearAllFormMessages();
g_form.clearMessages();
The message is added, but no matter the clear options I use, it is not getting removed. Kindly help.
Regards
Suman P.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-31-2024 04:40 AM - edited 12-31-2024 04:42 AM
@Community Alums ,
remove or comment the 4th line (clearFormMessage). Browser would have thrown and error as the method doesn't exist and stopped executing the 5th line. did you find any errors in the console?
If my response helped please mark it correct and close the thread so that it benefits future readers.
Regards,
Chaitanya

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-31-2024 04:23 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-31-2024 04:26 AM
@Community Alums
check my above message
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-31-2024 04:26 AM
Hi @Community Alums ,
g_form.addFormMessage('Test', 'info');
g_form.clearMessages();
Checked these 2 they are working fine.
I don't think clearAllFormMessages() and clearAlFormMessages() exist.
Check the browser console and see if any error is being thrown.
If my response helped please mark it correct and close the thread so that it benefits future readers.Regards,
Chaitanya

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-31-2024 04:30 AM
Hi @Chaitanya ILCR,
I did the same on onLoad Client Script, it is still showing up on my system.
Regards
Suman P.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-31-2024 04:33 AM
here you are calling both statements consecutively and you barely will see the message. try with delay and it should clear the message and remove the info parameter in clear function.
g_form.addFormMessage("test", "info"); setTimeout(function(){ g_form.clearMessages(); }, 3000);
Thank you,
Ali