How to clear Info / Error messages in Service Portal
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-27-2024 09:40 AM
Hello SNOW community,
I have an issue where messages that I display in a custom widget using spUtil.addInfoMessage() sometimes don't clear out automatically, but sometimes they do.
I'm looking for a way to force the messages that I displayed to go away after a couple of seconds.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-27-2024 10:45 PM
Hi @PabloL
Refer this KB : https://support.servicenow.com/kb?id=kb_article_view&sysparm_article=KB1211106
Mark it Helpful and Accept Solution!! If this helps you to understand.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-28-2024 08:35 AM
So I did try to use server side gs.addInfoMessage() combined with gs.flushMessages(), but I'm missing on how to wait a couple of seconds before clearing the messages, because setTimeout was not available from a Service Portal Widget's server script