locked
CRM 2013 Iframe doesn't refresh RRS feed

  • Question

  • I am using CRM 2013. I have added Iframe on FORM. I am showing custom ASPX page in Iframe. Whenever I create a new record. the Iframe doesn't refresh. I have added the below code to refresh the iframe on save of the record.. but it is not working..

     // query string parameters

    var IFrame = Xrm.Page.ui.controls.get("IFRAME_test");
    var Url = IFrame.getSrc();

    IFrame.setSrc(Url);

    Please help!

    Monday, August 18, 2014 1:58 PM

All replies

  • I assume that you have the on save event hooked up correctly and that the above code runs.  If so, then try replacing it with:

    document.getElementById('IFRAME_test').contentWindow.location.reload();

    Monday, August 18, 2014 3:47 PM
  • Is that the entire script ?

    Just curious , what happens if you add a random parameter ?

    var IFrame = Xrm.Page.ui.controls.get("IFRAME_test");
    var Url = IFrame.getSrc();
        Url += (Url.indexOf("?") != -1 ? "&" : "?") + "rnd=" + Math.random()
    
    IFrame.setSrc(Url);



    Dev Blog: Dynamics CRM - Thinking outside the Box

    Monday, August 18, 2014 6:32 PM
  • The 'random parameter' on the Querystring method does indirectly address the issue of reloading the IFrame page, so I don't see any reason it wouldn't work. 
    Monday, August 18, 2014 6:50 PM
  • Hi Adi Katz,

    It doesn't set the Iframe source. I have tried to set random Parameter but doesn't work. I have even tried to Set the Http://www.google.com but still doesn't work.

    Thanks!


    • Edited by Kaushal123 Tuesday, August 19, 2014 6:03 AM
    Tuesday, August 19, 2014 6:02 AM