Additional info message showing in list view when user is trying to edit columns in list view
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-28-2024 04:40 AM - edited 08-28-2024 04:41 AM
Requirement:
- Display an info message only in a list view in a 'Problem' table that should contain 'Last Refreshed Time' and 'Next refresh time' this info message should get updated in an interval of 10 minutes - Am able to achieve this requirement using business rule and UI action
- Problem currently facing: An additional info message is showing when user is trying to change value in list view, when clicked on cell.
Need to restrict/stop showing this 'additional info message' in the list view. Have also attached the screenshots below
I have highlighted the info messages in Red color that needs to be restricted.
script:
(function executeRule(current, previous /*null when async*/ ) {
var index = gs.action.getGlideURI().toString().indexOf('problem_list');
if (index > -1) {
var gdt = new GlideDateTime(); //uses current user session time zone (US/Pacific)
var usrDateTime = gdt.getDisplayValue();
var lastRef = usrDateTime.toString().split(" ");
var addSec = new GlideDateTime();
addSec.setValue(usrDateTime);
addSec.addSeconds(600); //10 mins. refresh interval
var nextRefresh = addSec.toString().split(" ");
nextRefresh = nextRefresh[1];
gs.clearMessages();
gs.addInfoMessage('<b> Last refreshed on: </b>' + lastRef[1] + '   <b> Next refresh Time: </b>' + nextRefresh);
}
})(current, previous);
Need help to fix this asap. Thanks
Regards,
Debashish
2 REPLIES 2
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-28-2024 04:48 AM
Hi,
have you tried to change the BR onAfter and for Update only?
Not on query and not on insert, as it is relevant to updating the data, so the insert is not needed, as you do not create records in list view...
———
/* If my response wasn’t a total disaster ↙️ ⭐ drop a Kudos or Accept as Solution ✅ ↘️ Cheers! */
/* If my response wasn’t a total disaster ↙️ ⭐ drop a Kudos or Accept as Solution ✅ ↘️ Cheers! */
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-28-2024 11:08 PM
Hi @GlideFather Tried this approach as well, it doesn't shows any info message in the lists, which is impacting my requirement 1.