Auto refresh a list (say incident) every 5 minutes

Arun Saravanan1
Kilo Contributor

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

3 REPLIES 3

Karthik Reddy T
Kilo Sage

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();




  1. /*Refresh Customer Incident List manually) */  
  2. function refreshCustomer() {  
  3. GlideList2.get("u_customer_incident").refresh();  
  4. }  
  5. 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.


Karthik Reddy T.
ServiceNow Commnunity MVP -2018 class.

Harsh Vardhan
Giga Patron

Shishir Srivast
Mega Sage

Please check if this helps: Auto refresh list