UI Builder REFRESH Data Resource

Buddle
Tera Contributor

Hi

 

I have updated a copy of the “Record Default” page to display some SLA data, this data displays correctly as intended.

 

Buddle_0-1709032939991.png

 

 

I have also added a refresh button using a  “Button Iconic” component and the “out of the box” REFRESH Events function, however, even though the data is displayed correctly, clicking on the button does not refresh the data.

 

Buddle_1-1709032939993.png

 

 

 

Does anyone have any idea why this doesn’t work?

 

Many thanks

3 REPLIES 3

Gustav Aldenbra
Kilo Sage

Hi @Buddle 

Have you tried adding an info message when button clicked to se if the button works?

Hi

 

Just tried that, the info message works fine on the same button, but still not refreshing the data.

 

Many thanks 

Akshay Gupta2
Kilo Sage

Hi @Buddle 

 

For refreshing Dada Resource you could use UI Builder api 

Eg.     api.data.evam_mytasks.refresh();

 

Here evam_mytasks is data resource name. You can replace it with your Data Source name.

You can create one client script and call this script on some button click this will referesh data resource for you.

 

For more information check - https://docs.servicenow.com/bundle/washingtondc-api-reference/page/app-store/dev_portal/API_referenc...

 

Do give a thumbs up if this helps.

Regards,

Akshay Gupta