Skip to Main Content

Automatically refresh a report with javascript every 15 minutes

User_6YEXCApr 21 2022 — edited Apr 21 2022

Good morning community,
I would like a report to be refreshed every 15 minutes on a mobile app. I suggest all the solutions I tried and they have failed. All of the below solutions are working 2-3 times and then they stop.
If you have another solution, please share.
Solution 1: On Javascript --> Execute when Page Loads
var intervalID = setInterval(refreshRegion, 900000);
function refreshRegion(){
apex.event.trigger( "#users_id", "apexrefresh" );
apex.event.trigger( "#clock_id", "apexrefresh" );
}
Solution 2: On Javascript --> Execute when Page Loads
setTimeout(function () {
apex.event.trigger( "#users_id", "apexrefresh" );
apex.event.trigger( "#clock_id", "apexrefresh" );
}, 900000);
Solution 2: On Javascript --> Execute when Page Loads
setTimeout(refresh_regions, 900000);
function refresh_regions() {
apex.event.trigger( "#users_id", "apexrefresh" );
apex.event.trigger( "#clock_id", "apexrefresh" );
setTimeout(refresh_regions, 900000);
}
PS. Currently, I am using plug-in of Mr. Ronny Weiss, but I would like to know how this could happen via javascript.
https://apex.world/ords/f?p=100:710:15902201594219::::P710_PLG_ID:RW.APEX.CLIENT.TIMER

Comments
Post Details
Added on Apr 21 2022
2 comments
173 views