How to force refresh a dynamic list page on page load?

Hello,

I have a dynamic list page and a details page in a user only area. The detail page has a for which allows you to add a new instance to the database which then appears on the list page.

On submit of the form on the detail page, you’re redirected to the list page, however the new item doesn’t display in the list unless you hit refresh in the browser. Can I somehow force the list to refresh on page load?

It works fine in preview, but not in live??

Any help would be appreciated.

1 Like

Hello Jamie,

There is no need to refresh the page itself, all that needs refreshing is the dataset connected to the list. You can do that with the .refresh() method found - here. It is also a good idea to sync your sandbox collection with your live so that both data are consistent with each other.

Goodluck!

Best,
Majd

1 Like

Hello Majd,

Thanks very much for the pointer to .refresh() on the dataset. I had been calling this on the table instead by accident.

I’ve tried your suggestion and it didn’t appear to work, I then decided to test under different browsers (was testing with Safari on macOS) and found it worked perfectly on Chrome and Firefox. Must be a Safari bug??

Any suggestions?

Scrap that, must have been cached. Working fine on all browsers now by applying refresh on the dataset, not the table. Thanks again Majd