Is there a way for FetchXML to return the most up-to-date data from a table?
I've got a page that runs FetchXML when it loads. It looks at a Dataverse table and returns some specific values (employee number, a choice, department number). The page will display certain things depending on the value of the choice. This is done through liquid. The problem is, the choice can change when the user is on that page. If it does change and the page is reloaded, it's still grabbing the old choice value and not the new one. It shows the change in Dataverse though. It takes 5+ minutes for the FetchXML to get the most recent data.
Is this something that can be immediate?
Thanks for the suggestion. Adding
Your queries will pull data from the Portals Cache which is why you see data where the data has been added/updated in Dataverse and not yet updated in the Cache (which takes a couple of minutes).
Note: It is not recommended by Microsoft to break the Cache, but you can if you are querying the data yourself (you can't if using a standard view), what you do is add a condition into your fetchxml that includes date-time down to seconds (e.g. createdon is less than or equal to today). Basically this makes your query a bit more unique (except for another user making the same query in the same second) and so will pull the data from Dataverse.
(I don't have it at hand, but you will find this has been answered with an example in the past)
Fubar
69
Super User 2025 Season 1
oliver.rodrigues
49
Most Valuable Professional
Jon Unzueta
43