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:13 AM - edited ‎08-28-2024 04:16 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 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
1 REPLY 1

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-28-2024 07:26 AM
It's likely that when you click into a cell to list edit the UI is querying the DB again which is triggering your BR to run. You might look at the transaction log to see if there's any way to filter out that sort of query from the initial page load.