- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-16-2020 11:17 PM
hi,
I am facing a phenomenon where a message remains when I approve it on a portal page(id=hrm_todos_page).
The message can be displayed, but how can I clear the message?
Regards,
Solved! Go to Solution.
- Labels:
-
Service Portal

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-16-2020 11:57 PM
Hi,
If this is on the page and not on the form, then in any of the widget that is shown on the form, run this code.
- this.g_form.clearMessages();
- $scope.page.g_form.clearMessages();
If there is any form in this page, then simply use
g_form.clearMessages() in the onload client script and it will work
Kindly mark the comment as a correct answer and helpful if it helps to solve your problem.
Regards,
Asif
2020 ServiceNow Community MVP

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-16-2020 11:57 PM
Hi,
If this is on the page and not on the form, then in any of the widget that is shown on the form, run this code.
- this.g_form.clearMessages();
- $scope.page.g_form.clearMessages();
If there is any form in this page, then simply use
g_form.clearMessages() in the onload client script and it will work
Kindly mark the comment as a correct answer and helpful if it helps to solve your problem.
Regards,
Asif
2020 ServiceNow Community MVP
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-17-2020 02:19 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-17-2020 02:28 AM
Hi Mi,
Yes, it's a widget so you need to clone or update the server script message under the widget.
Mark Correct if this solves your issue and also mark Helpful if you find my response worthy.
Thanks,
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-17-2020 04:15 AM
Hi,
Thank you for reply.
Is it correct in the server script, not the client?
Regards,