locked
Error message while reloading crm form RRS feed

  • Question

  • We have reactivated case. We are assigning record to another user using custom functionality as out of box functionality could not fulfill the requirement. Once record is assigned (through html page / java script) , we want to refresh page so that new value is reflected on case form.

    We are getting following error message when we are trying to reload page with following java script code:

    window.location.reload()

    We even tried following additional code , still below mentioned error message persists:

    var currentUrl = window.location.href; 
    if (currentUrl.indexOf('#') > -1)
     { 
        currentUrl = currentUrl.replace('#', ''); 
     } 
    else
    {
      currentUrl += '#';
     }
    
    window.location.href = currentUrl; 
    

    MS CRM 2011 To display the webpage again, the web browser needs to resend the information you've previously submitted.  If you were making a purchase, you should click Cancel to avoid a duplicate transaction. Otherwise, click Retry to display the webpage again.

    Your inputs are highly appreciated.

    Thanks!

    Tuesday, October 1, 2013 6:48 AM

All replies

  • Hi,

    Try window.location.href = currentUrl;


    Kids don't try this at home!

    Wednesday, October 2, 2013 3:52 AM
  • Another option is to save the page, which will cause it to refresh.  Just make sure that it's ok to save the page at that point:

    Xrm.Page.data.entity.save();

    Hope that helps,

    Ray

    Wednesday, October 2, 2013 3:30 PM
  • Appreciate your inputs Gayan / Ray. However both options did not work.
    Thursday, October 3, 2013 1:22 PM