locked
CRM 2011 Cases Auto Refresh broking - Rollup 17 RRS feed

  • Question

  • Hi

    I need your help as we had auto refresh working before rollup 6 but once we applied the rollup 17 then nothing works and no auto refresh to load the new cases which is very important. can someone help to look at below code what is wrong pls? Or if there is another easier way to handle. This is how our CRMWEB\_root\HomePage.aspx

    <%@ Page language="c#" Inherits="Microsoft.Crm.Web.EntityHomepage" CodeBehind="Microsoft.Crm.Application.Pages.dll" %>
    <%@ Register TagPrefix="cnt" Namespace="Microsoft.Crm.Application.Controls" Assembly="Microsoft.Crm.Application.Components.Application" %>
    <html>
    <head>
    <cnt:AppHeader runat="server" id="crmHeader"/>
    <script langugae="javascript"> 
    
    
    function BodyOnload()
    {
    if ( getQueryString("etc") == 112)
    { 
    alterGridRecords();
    getDeadline();
    var Grid = document.getElementById('crmGrid');
    Grid.attachEvent('onrefresh',alterGridRecords);
    Grid.attachEvent('onrefresh',getDeadline);
    window.setInterval('crmGrid.Refresh();', 30000);
    }
    }
    
    function getQueryString(key)
    {
    var default_;
    if (default_==null) default_=""; 
    key = key.replace(/[\[]/,"\\\[").replace(/[\]]/,"\\\]");
    var regex = new RegExp("[\\?&]"+key+"=([^&#]*)");
    var qs = regex.exec(window.location.href);
    if(qs == null)
    return default_;
    else
    return qs[1];
    }
    
    </script> 
    </head>
    <body class="stage" onload="BodyOnload();">
    <ui:EventManager runat="server" id="crmEventManager"></ui:EventManager>
    <table class="stdTable" cellpadding="0" cellspacing="0">
    <tr>
    <td style="height:0%"><cnt:InAppContent id="crmInAppContent" runat="server"/></td>
    </tr>
    <tr height="29" runat="server">
    <td runat="server">
    
    <table class="homepage_table" width="100%" cellpadding="0" cellspacing="0" runat="server">
    <tr runat="server">
    <td runat="server" style="padding: 0px;"><cnt:GridControlBar runat="server" id="gridControlBar"/></td>
    </tr>
    </table>
    
    </td>
    </tr>
    <tr height="25" runat="server">
    <td class="homepage_menubar" runat="server"><mnu:AppGridMenuBar id="crmMenuBar" runat="server"/></td>
    </tr>
    <tr>
    <td id="homepageTableCell" runat="server">
    </td>
    </tr>
    </table>
    </body>
    

    Monday, November 3, 2014 3:05 AM

All replies

  • Hi,

    Refer this.


    Regards, Saad

    Monday, November 3, 2014 6:02 AM
  • Thanks Saad, tried it from there so does not work.
    Monday, November 3, 2014 7:17 AM
  •  Use setTimeout instead of setInterval:

    window.setTimeout('crmGrid.Refresh();', 30000);


    Regards, Saad

    Monday, November 3, 2014 9:43 AM
  • it didn't work. beside homepage.aspx is there anywhere else I have to do anything too? the issue is also when I add below code in the body then the crm page shows the error all together. It says an error has occurred and does not load the page at all.

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

    <ui:EventManager runat="server" id="crmEventManager"></ui:EventManager>
    <table class="stdTable" cellpadding="0" cellspacing="0">
    <tr>
    <td style="height:0%"><cnt:InAppContent id="crmInAppContent" runat="server"/></td>
    </tr>
    <tr height="29" runat="server">
    <td runat="server">

    <table class="homepage_table" width="100%" cellpadding="0" cellspacing="0" runat="server">
    <tr runat="server">
    <td runat="server" style="padding: 0px;"><cnt:GridControlBar runat="server" id="gridControlBar"/></td>
    </tr>
    </table>
    </td>
    </tr>
    <tr height="25" runat="server">
    <td class="homepage_menubar" runat="server"><mnu:AppGridMenuBar id="crmMenuBar" runat="server"/></td>
    </tr>
    <tr>
    <td id="homepageTableCell" runat="server">
    </td>
    </tr>
    </table>
    ------------------------------------------------

    Tuesday, November 4, 2014 12:43 AM
  • Please trace the error and paste it here.

    Regards, Saad

    Tuesday, November 4, 2014 4:27 AM
  • Hi Saad

    Not an expert on doing this. It would be great if you can guide the whole process. how and where do I need to add the code so that it works .

    Wednesday, November 26, 2014 1:17 AM