Create a refresh button

Meidan Diamond
Kilo Explorer

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

1 REPLY 1

Meidan Diamond
Kilo Explorer

bump