Create a refresh button
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-07-2022 06:31 AM
Hey guys,
I'm trying to create a script that'll make a UI button to refresh the 'incidents' page automatically.
I found a lot of explanations on the web, but I can't figure a way to stop the refresh.
I've found this:
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(); }, 180000);
And it works, but if i want to set the refresh to 30s - I can't stop it.
Is there a way to make it so that when I click again, the script will stop? Or even a page refresh will stop it? because it never does, and I have to disable/change the entire script so it'll work.
thanks in advance
- Labels:
-
Scripting and Coding
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-10-2022 03:25 AM
bump