Error and Info Message immediately disappear
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-05-2022 09:28 PM
Just upgraded from Quebec to San Diego
This Business Rule attached to the Change_Request
(function executeRule(current, previous /*null when async*/ ) {
var ctask = new GlideRecord('change_task');
ctask.addQuery('change_request', current.sys_id);
ctask.query();
if (!ctask.next()) {
gs.addErrorMessage("Your implementation plan requires at least one Change Task.");
current.state = 1;
current.approval = 'not requested';
}
})(current, previous);
Until now this left the error or warning message visible, after the upgrade it immediately disappears. I am sure it's to do with the page refresh function, sometime the UI will diver elsewhere and the Error message remains.
Messages also immediately disa[ppear if I use either or both:
gs.addInfoMessage("Information");
current.setAbortAction(true);
The system message timeout is set to 5, made no difference setting it to 0 or 200.
Tried terminating the above script with each of these, made no difference.
gs.setRedirect(current);
action.setReturnURL(current);
I have checked that non of the other Business_Rules attached to the Change_Request have a gs.flushMessages();
Can anyone advise what is causing this or how I can track down the error? Attached image shows the message appearing, it immediately goes away on the Change Record (no matter from which Business Rule that I set it).
- Labels:
-
User Interface (UI)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-07-2022 04:08 PM
It was a client side script calling g_form.clearMessages(); activated on the Change_Request form reload. Working correctly now.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-09-2023 08:29 AM
Hello,
Could you please provide the name of the system property? I can't seem to find it myself to update as the infomessage timer is pretty short.
Kind Regards
Ashley
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-09-2023 08:34 AM
Not to worry, found it here:
https://support.servicenow.com/kb?id=kb_article_view&sysparm_article=KB0713722