Auto refresh a list (say incident) every 5 minutes
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-06-2017 11:16 PM
Hi All,
We have an requirement to auto refresh a list (say incident) every 5 minutes. Is it advisable to implement this functionality ? If not, What are the disadvantage of implementing this ?
Any help is much appreciated.
Thanks,
Arun
- Labels:
-
Best Practices

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-06-2017 11:18 PM
Hello Arun,
You can Create a UI Action with the following code to refresh the list view:
This will refresh the list view every 5 minutes.
Name: Refresh List Show
Insert: true
Show Update: true
Client: true
List banner button: true
List context menu: true
onClick: refreshCustomer();
- /*Refresh Customer Incident List manually) */
- function refreshCustomer() {
- GlideList2.get("u_customer_incident").refresh();
- }
- setTimeout(function() {refreshCustomer(); }, 300000);
Modify the script above to apply it to the table you'd like to refresh on.
This script will auto refresh, and also allows the user to manually refresh as well.
Take the end number, which is the amount of milliseconds and modify accordingly as well. 300000 = 5 minutes.
ServiceNow Commnunity MVP -2018 class.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-07-2017 12:00 AM
may i know why are you refreshing your related list every 5 mint?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-07-2017 12:09 AM
Please check if this helps: Auto refresh list