Follow my blog for more interesting topics on Dynamics 365, Portals and Power Platform. For training and consulting, write to us at email@example.com
“Clear cache to reflect the latest changes to a CDS or Dynamics 365 Environment in PowerApps or Dynamics 365 Portals”. A requirement which is required in almost portal application implementation. Whether you are using erstwhile Dynamics 365 portals or Power Apps portals, this is a requirement you have in every implementation.
Now coming to the blog topic. You may be wondering – Why another blog of refreshing cache in portal? Aren’t there already too many good blogs out there which discuss this topic. Well, the answer to this is resounding YES. However the information is kind of scattered. There are so many bits and pieces of information related to clearing portal cache. And in this blog I will try to collate all of them to best of my knowledge. So let’s understand what are the different scenarios to refresh portal cache.
Clear Cache in PowerApps portal studio
If you are a developer, this is the tool of your choice. What is PowerApps portal studio? It’s a WSYWIG editor to design your portal and basically the starting point for any developer starting with the portal. But how can I open PowerApps portal studio?
To open PowerApps portal studio, navigate to PowerApps Maker portal and from the Apps list, select your portal and then click on Edit.
And you are in PowerApps portal studio, a WSYWIG editor to help you designing the portal.
Every time you make any changes, click on Sync Configuration and Browse website links at the top right of the screen. Once you do that, the portal will be launched. The portal will reflect the latest changes in configuration data and data changes made in CDS/ Dynamics 365.
This is developer’s delight and why not? You make changes to the portal and just use the sync and browse to see your changes take effect. Very good for developers I guess. But no so great for administrators or Power users I shall say.
Clear cache from Portal
This is probably the most common way to clear portal cache. To navigate to this page, you need to use the URL in below format.
Once you browse this URL, you will have the option to clear cache and clear config data.
Using the clear cache option you can clear the cache to reflect latest data changes in PowerApps portal. You can also use the Clear config button to clear configuration data from cache. These are the configuration entities refreshed when you clear config. Portal metadata is stored in entities called configuration entities. If you change configuration entities u, you must select Clear config to clear the configuration cache.
You will also like these posts
Now the question comes, can any portal user access this page to clear portal cache? The answer is NO. To access this page, the portal user (contact record in CDS/ Dynamics 365) should have the “Administrators” web role.
As of the time of writing this blog, Microsoft have introduced some latest changes in the cache functionality in upcoming version of the portal. You can refer to the documentation here.
Reflect Data changes in Common Data Service (CDS) immediately in portal
This is a common complaint by customers. Data changes done in Dynamics 365/ CDS are not immediately reflected in PowerApps portal. You may be thinking, can’t I go ahead and refresh the portal cache from _service/about page. But I think for obvious reasons and you know why this cannot be a solution.
SLA for cache refresh is 15 minutes. Any changes from Common Data Service will reflect on portals within 15 minutes. We cannot ask end users to wait for 15 mins to reflect changes in portal.
If you are working on portals since the days of ADX portals, you know there was a feature called Web notification. We no longer need Web notification. CDS/ Dynamics 365 entities have a feature called Change tracking. Open Entity customization and you can see a feature called – “Change Tracking“.
To make sure that record data changes in CDS/ Dynamics 365 are reflected in the portal, you just to need to make sure that Change tracking is enabled for the entity.
Once you enable Change tracking for the entity and publish the customization, data changes made to CDS entities will be immediately reflect in portal.
Checkout my latest posts
- Business Rules in PowerApps Canvas apps
- How to set up Custom Url for PowerApps Portal/ Dynamics 365 Portal
- Reset a PowerApps Portal – A Complete Guide
- Error Management in PowerApps/ Dynamics 365 Portals – A complete guide
- Diagnostic logging in PowerApps portals/ Dynamics 365 Portals
Hope this helps!
(Business Solutions MVP)