locked
Dynamics CRM 2011 - JavaScript issues with iFrame RRS feed

  • Question

  • Hello,

    I am having problems firing the below JavaScript on load of an account record, Im using rollout 14 and I get the below exception:

    "Error - Unable to get value of the property 'setSrc': object is null or undefined"

    I read somewhere that the setSrc coding is not applicable after rollout 12, however the source was not 100% reliable. Does anyone know any alternative code which will fire using an iFrame URL link to Bing, please see below:

    function updateBingIFrame()
    {
    //get the name
    var accountname= Xrm.Page.getAttribute("new_accountname").getValue();
    //Check that there is a name
    if (accountname)
    {
    //Update the IFrame
    var bingIframe = Xrm.Page.ui.controls.get("IFRAME_Bing");
    var newUrl = "http://www.bing.com/?q=" + encodeURIComponent(new_accountname);
    bingIframe.setSrc(newUrl);
    }
    }

    Thanks

    Samr


    • Edited by samrr1875 Wednesday, October 30, 2013 8:34 AM altered code
    Tuesday, October 29, 2013 4:35 PM