- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-12-2019 09:54 AM
Hi All,
Can we extend gs.addErrorMessage() time on Service portal?
I want to trigger Error Message When user's Manager is not assigned. Message is getting displayed but it disappears after few seconds can we extend the time for error message?
Below is my code which I have added on server controller part of a widget.
var grUser = new GlideRecord('sys_user');
grUser.get(gs.getUserID());
grUser.query();
if(grUser.next())
{
if(grUser.manager =='' )
{
gs.addErrorMessage("Manager field is empty");
}
}
Thanks and Regards,
Meenal
Solved! Go to Solution.
- Labels:
-
Service Catalog
-
Service Portal
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-12-2019 09:58 AM
Hi Meenal,
there is 1 system property; try to check the value for that
glide.service-portal.notification_timeout.seconds
I think default is 5; but try to increase to 10 or 20 seconds and check;
a value of zero disables auto-dismissal i.e. message will be shown unless user clicks cross icon
Note: this would be a global change
Mark Correct if this solves your issue and also mark Helpful if you find my response worthy based on the impact.
Thanks
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-12-2019 09:58 AM
Hi there,
Maybe this article contains what you are after:
addMessage popup is inconsistently disappearing or staying up in the service portal
It contains "In London, a system property has been added to configure the message timeout."
If my answer helped you in any way, please then mark it as helpful.
Kind regards,
Mark
---
Kind regards,
Mark Roethof
Independent ServiceNow Consultant
10x ServiceNow MVP
---
~444 Articles, Blogs, Videos, Podcasts, Share projects - Experiences from the field
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-12-2019 10:09 AM
Hi Mark,
Thank you for replying.
Regards,
Meenal Gharat
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-12-2019 09:58 AM
Hi Meenal,
there is 1 system property; try to check the value for that
glide.service-portal.notification_timeout.seconds
I think default is 5; but try to increase to 10 or 20 seconds and check;
a value of zero disables auto-dismissal i.e. message will be shown unless user clicks cross icon
Note: this would be a global change
Mark Correct if this solves your issue and also mark Helpful if you find my response worthy based on the impact.
Thanks
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-12-2019 10:10 AM
Hi Ankur ,
Thanks for the help, It worked.
Regards,
Meenal gharat