Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics CRM (Archived)

Need a way to manually invalidate portal cache via javascript.

Posted on by Microsoft Employee

In ADXStudio portal version 7 you could send a request to .../Cache.axd?Message=InvalidateAll using custom javascript on the portal page. This does not work in version 8, and from reading other forum posts it sounds like the only way to manually clear the cache is to restart the portal. We have an application that uses the CRM API to update a quote and then returns to the portal page and refreshes the page, but the data from the quote does not get updated for anywhere from 1 to 5 seconds. Has anyone found a way to get the data on a portal page to refresh quicker, or at least a way to know when it is refreshed, using custom javascript on the page?

*This post is locked for comments

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Need a way to manually invalidate portal cache via javascript.

    Hey Nadeeja, thanks for your response. Waiting 5 seconds to reload is what we are currently doing, it's just not the ideal experience for the end user. I'm hoping to find some way to tell when the cache is refreshed so I can refresh the page as soon as it is ready. If it were consistently 1 second it wouldn't be so bad, there's just no way to tell if it's going to be 1 second or 5 seconds.

  • Suggested answer
    Nadeeja Bomiriya Profile Picture
    Nadeeja Bomiriya 6,804 on at
    RE: Need a way to manually invalidate portal cache via javascript.

    Hi Derek,

    There are plugins in CRM (Web Notification Plugins) that trigger when records getting created or updated, which invalidates the portal cache. Plugins run in real time and there's no way to make it faster than 1 sec as far as I know. You could implement a JavaScript function to refresh the page after 5 seconds.

    stackoverflow.com/.../how-to-reload-page-every-5-second

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,280 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,214 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans