locked
Customer Portal not syncing in real time with CRM RRS feed

  • Question

  • Hi.. I notice that when I add a note to a case in CRM it doesn't seem to be updating the case on the Customer Portal in real time. After a refresh the case note still wasn't visible so I did an IISRESET and the note was visible.

    Customers are getting notified that there is a note added to a case but they can't view it.

    Is there something I can do after a note/case is added from CRM to sync it with the Customer Portal?

    Thursday, July 14, 2011 10:01 AM

Answers

  • Hi Troy, thanks for the reply. I've only got around to investigating this now and found the following in the CRM SDK 2011 .chm file (help) which fixed the issue...
    Title: Set Up Cache Invalidation to Refresh Changes on the Website
    Web sites developed using Developer Extensions for Microsoft Dynamics CRM 2011 make heavy use of caching. As a result, changes made to Microsoft Dynamics CRM entities in the Web application or in Microsoft Dynamics CRM Online may not immediately show up on the Web site. To resolve this, you can set up cache invalidation to happen automatically with the use of the Web Notification Plug-in and a Web Notification URL.
    First ensure that the Web notification plug-ins are enabled for the solution.
    Next, create a new Web notification URL (from the Settings menu) that goes to the cache invalidation handler of your Web site. The URL to your cache invalidation will be http(s)://your-website-domain/Cache.axd.
     
    Now, any time entities are created, updated, or deleted, your Web site’s cache invalidation handler will be notified and will invalidate the necessary cache depending on what has changed.

    • Marked as answer by iSite-BS Tuesday, July 19, 2011 2:03 PM
    Tuesday, July 19, 2011 2:03 PM

All replies

  • What you are running into is advanced developer extensions caching ability that is used by the portal.  In order to boost performance the system keeps a copy in cache of data you have fetched from CRM.  It then relies on that cache for any further requests you make for the same data.  This boosts performance because it's not making as many requests to CRM.  restarting IIS is one way you can invalidate the cache so it pulls new data.  It's also possible to turn this caching off entirely in the configuration file.  When developing, there is a javascript function you can run that will invalidate the cache, but this isn't appropriate for a live environment.

    javascript:var sURL=document.location.protocol + '//' +document.location.host;var oHttp=new ActiveXObject("Msxml2.XMLHTTP.6.0"); oHttp.Open('GET',sURL+'/Cache.axd?Message=InvalidateAll&d=' + (new Date()).valueOf(),false);oHttp.Send();window.location.reload(true);

    Here is one person's approach to handling caching in a better way than all or nothing for production.  Your mileage may vary, but this post should give you enough to start googling around for a solution that meets your needs.

     

    http://pogo69.wordpress.com/2010/10/29/to-cache-or-not-to-cache-crm-4-0-sdk-advanced-developer-extensions/

    Thursday, July 14, 2011 7:02 PM
  • Hi Troy, thanks for the reply. I've only got around to investigating this now and found the following in the CRM SDK 2011 .chm file (help) which fixed the issue...
    Title: Set Up Cache Invalidation to Refresh Changes on the Website
    Web sites developed using Developer Extensions for Microsoft Dynamics CRM 2011 make heavy use of caching. As a result, changes made to Microsoft Dynamics CRM entities in the Web application or in Microsoft Dynamics CRM Online may not immediately show up on the Web site. To resolve this, you can set up cache invalidation to happen automatically with the use of the Web Notification Plug-in and a Web Notification URL.
    First ensure that the Web notification plug-ins are enabled for the solution.
    Next, create a new Web notification URL (from the Settings menu) that goes to the cache invalidation handler of your Web site. The URL to your cache invalidation will be http(s)://your-website-domain/Cache.axd.
     
    Now, any time entities are created, updated, or deleted, your Web site’s cache invalidation handler will be notified and will invalidate the necessary cache depending on what has changed.

    • Marked as answer by iSite-BS Tuesday, July 19, 2011 2:03 PM
    Tuesday, July 19, 2011 2:03 PM