Skip to main content

Notifications

Power Pages - General Discussions
Unanswered

Sync delay between updated data and power page

Posted on by
Hi Everyone,
 
i have a power page that acts as a shop to buy products. In this shop i want to shop the person that is logged in (contact table) how much budget he has.
I get the budget using an api call that is executed when the page is loaded. 
The issue i have is when i submit an order and go back to the home page the budget in dataverse is updated but the budget on that i show on the power page is not.
I feel like there is a delay between of 3 to 5 minutes when the order is submitted and the budget is updated. If i check dataverse i can see the updated budget immediately but when i refresh the page and debug the api call, It still shows the old value of the column and not the new value that has been updated.
 
Anyone ideas on how to fix it? i am using the contacts default table.
 
Thansk in advance!
 
Categories:
  • Suggested answer
    SaiRT14 Profile Picture
    SaiRT14 10 on at
    Sync delay between updated data and power page
    • Disable or Bypass Caching: Ensure your API requests fetch fresh data by appending unique parameters to the URL to prevent caching.

    • Force Data Refresh: Use JavaScript to clear cached data or trigger the API call again after an order is processed.

    • Use Dataverse Change Tracking: Implement change tracking in Dataverse to trigger a real-time update on the Power Page when the budget changes.

    • Reduce API Call Delay: Optimize your API to minimize server-side delays and ensure immediate reflection of changes in Dataverse.

  • Suggested answer
    GWham Profile Picture
    GWham 39 on at
    Sync delay between updated data and power page
    How are you displaying the result and where are you displaying them?
     
    You are falling victim of portal cache.
     
    1. If you are using a entity list, id suggest that you add a filter condition where createdon not equal now  so that it always performs a query.
     
    2. If you are doing fetchxml add a filter condition to force the cache through.
    <condition attribute="createdon" operator="ne" value="{{now}}" />   
    3. If your expecting your results in the header for whatever reason e.g. a shopping basket number increasing then try disabling the site setting.
    header/outputcache/enabled
     
     
     
  • Suggested answer
    Fubar Profile Picture
    Fubar 7,351 on at
    Sync delay between updated data and power page
    Your delay is most likely due to the portal Cache.  Updates made directly in Dataverse from another interface do not push to the cache immediately. Similar can also occur when using asynchronous processes or you have a process that runs and creates/updates a record that is not the Primary record (e.g. update a record on the portal,  that record is considered the Primary, this triggers a process that creates a record in different table - this record is considered the Secondary record).
    It is not clear from your description if the issue is just that you are using asynchronous processes (note: standard Dataverse Flow is asynchronous), if so use synchronous ones (realtime plugin or realtime Workflow, or possibly PowerPages Flow), or if it is the Secondary record type issue.
     
    If you are reading the value from the portal using the Portals Web API or using Liquid fetchxml there is a workaround where you can include a criteria that will always be true in your query that makes the query close to unique (so the portal is forced to call Dataverse rather than just the cache), e.g. add createdon is less than today (where the value you use for today is formatted down to seconds).

Helpful resources

Quick Links

Welcome to the Power Platform…

We are thrilled to unveil the newly-launched Power Platform Communities!…

Community Update 9/9/24…

Power Platform Community Update…

Welcome to the new Power Platform Community!…

We are excited to announce our new Copilot Cookbook Gallery in the Community…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 140,690

#2
RandyHayes Profile Picture

RandyHayes 76,308

#3
Pstork1 Profile Picture

Pstork1 63,355

Leaderboard

Featured topics