Add info message to top of list view using Before Query Business Rule
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-19-2025 07:04 AM
I have a Before Query business rule that adds an info message to a list view.
I am running into an issue when the list view query uses "GROUPBY", the query seems to run twice and display the message twice.
Is there a workaround to this? Or a different way to add an info message to the top of a list view?
Code:
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-19-2025 08:13 AM
This makes the query run twice. Unless I am inserting the line of code in the wrong place.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-19-2025 07:27 AM
Can you try with below code :
if (!gs.getSession().getProperty('info_message_shown')) {
var _strCurrentURL = (gs.action.getGlideURI() || "").toString();
if (_strCurrentURL.contains("_list.do")) {
gs.addInfoMessage("Info Message");
gs.getSession().setProperty('info_message_shown', 'true');
}
}
Please mark correct/helpful if this helps you!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-19-2025 08:14 AM
I tried this and it does not display any info messages