The message appears and then disappears immediately in production, but it works correctly in develop
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Hi everyone,
I'm facing an issue where a server-side error message disappears almost instantly on the Production environment, while it stays visible on the Dev environment until manually closed.
Here is the UI Action code I'm using:
function runPullback() {
var answer = confirm("Pull back confirm");
if(answer) {
gsftSubmit(null, g_form.getFormElement(), 'u_pullback');
}
}
if (typeof window == 'undefined') {
runPullbackServer();
}
function runPullbackServer() {
gs.addErrorMessage("Pull back error");
current.setAbortAction(true);
action.setRedirectURL(current);
}
- Issue: When running this in the Dev environment, after clicking "Pull back", the error message appears and stays visible until I manually close it. However, on Production, the message only flashes for a split second and then disappears (as shown in the attached image).
- What I've checked: I have checked for
g_form.clearMessages()in all related Client Scripts, but found no scripts that would clear the messages. - Question: Could you please let me know what might be causing this behavior?
Thank you all!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Hi @tomato20250
Check scripts under UI Policies too OR try to perform code search via ServiceNow studio where this "clearMessages()" has been called in your entire ServiceNow platform.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Thanks for your reply @Laveena-Agarwal .
I’ve already checked all the places related to the current page and there’s no clearMessages() being called. Could you let me know if there are any other possible causes for this issue?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Thanks for your reply.
I’ve already checked all the places related to the current page and there’s no clearMessages() being called. Could you let me know if there are any other possible causes for this issue?
