web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Pages / Data updated in CRM ar...
Power Pages
Answered

Data updated in CRM are not instantly changed on the Portal?

(0) ShareShare
ReportReport
Posted on by 503

Hi all, 

 

I am trying to get instant updates from CRM to portal. So when a field is changed in CRM then it is instantly reflected in the portal. I am trying to do this as I have created a booking system that needs to reflect synchronous updates if changed on portal or CRM backend. 

 

The issue I am getting is that when I update a field in CRM, the cache seems to take 1-5 minutes to update on the portal side. I cannot have this as it is a booking system and the user needs to see the reflected change in CRM on the portal if it gets updated immediately. 

 

I tried creating a WebAPI following this article (https://readyxrm.blog/2021/01/05/using-the-power-apps-portals-webapi-to-clear-the-portal-cache/) but it seems to only work sometimes. Meaning that sometimes the change is reflected instantly which is great, but then other times it can take 1-5 minutes. Im unsure why this method would only work sometimes? I have done everything in the article and receive no errors in my JavaScript, also all permissions and site settings are set. I have also turned on 'Change Tracking' on the targeted entity with no better result. 

 

Here is my code on the redirect page which should retrieve the latest updated info (registration count) from CRM - 

 

{% block main %}
{% include 'Wrapper AJAX' %}
{% assign RegistrationPage = sitemarkers["CacheRefreshPageTransfer"] %}
{% assign guid = request.params['id'] %}
<script>
 function rtc() {
 try {
 
 var n = Date.now();
 //var timestamp = n.toString();
 var guid = "{{guid}}";
 //alert(guid);
 webapi.safeAjax({
 type: "GET",
 url: "myURL.com/_api/adx_eventschedules(" + guid + ")?$select=iop_registration_count",
 contentType: "application/json",
 //data: JSON.stringify({
 // "value": timestamp
 //}),
 async:false,
 success: function(res) {
 window:location.href = "{{ RegistrationPage.url }}?id={{guid}}";
 console.log(res);
 }
 ,
 error:function(res)
 alert("Error");

}
 });
 } catch (err) {
 alert(err.message);
 }
 }
 $(document).ready(function() {
 rtc();
 });

</script>
{% endblock %}

 

As I mentioned sometimes this works and change in CRM is reflected instantly on portal but then other times it takes much longer. 

 

Im wondering if a Power AUtomate flow HTTP request might help here? So It can pull the data from CRM and update on the portal somehow? Just a thought. 

 

Hoping for some help as I have been stuck for 2 days now. 

 

Thanks very much all. 

Categories:
I have the same question (0)
  • ragavanrajan Profile Picture
    7,044 Most Valuable Professional on at

    Hi @Usernametwice23 

     

    You could try flow HTTP requests. There is a high chance it may work. 

    Regarding web API, I would suggest you to raise a helpdesk ticket to see what is their thoughts. 

     

    Hope it helps.

    ------------

    If you like this post, give it a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users to find it.

  • Verified answer
    Fubar Profile Picture
    8,505 Super User 2026 Season 1 on at

    It is a known limitation - to quote the documentation "Updates from DataVerse are communicated to the portal in asynchronous mode,", to make it even worse he SLA for this update is actually 15 minutes (but usually occurs within a few minutes).

     

    Making a call from the Portal using HTTP flow should work, but depending on what you are doing you may then also need to manage additional security (as by default HTTP Flow is open to the world).

     

    I'm not sure if this will still work or not,  but you used to be able to write a FetchXML statement in Liquid so that it would have to avoid the portal cache by adding the following condition (note: this would not be recommended by Microsoft)

    <condition attribute="createdon" operator="le" value='{{ "today" | date: "yyyy-MM-dd HH:mm:ss" }}' />

     

    Another option may be to use Implicit Grant Flow to work around the portal cache https://docs.microsoft.com/en-us/power-apps/maker/portals/oauth-implicit-grant-flow

     

     

  • Usernametwice Profile Picture
    503 on at

    @Fubar 

     

    Yes I actually created a HTTP Flow and it seemed to work and I was in the process of finishing it today. I then came across your solution - 

    <condition attribute="createdon" operator="le" value='{{ "today" | date: "yyyy-MM-dd HH:mm:ss" }}' />

    This works as well! Thank you very much. A lot easier then the path I was taking. 

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Launch!

Jump in, show your community spirit, and win prizes!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Pages

#1
11manish Profile Picture

11manish 50

#1
11manish Profile Picture

11manish 50

#3
Valantis Profile Picture

Valantis 26

Last 30 days Overall leaderboard