Quantcast
Channel: Microsoft Dynamics CRM Forum - Recent Threads
Viewing all articles
Browse latest Browse all 82002

Problem refreshing webresource using setSrc and getSrc

$
0
0

Hi all,

I have a webresource that I need to refresh in formOnload.

As a result setStatusProgressVisibility function is called(See the below code)

function setStatusProgressVisibility() {
    var wrControl = Xrm.Page.getControl("WebResource_StatusProgress");
    arrStatusProgress = ["100000024","100000044","100000026","100000028","100000091","100000092"];
    wrControl.setLabel("Investigation Status");
   wrControl.setVisible(true);

       var src = wrControl.getSrc()
        wrControl.setSrc(null);
        wrControl.setSrc(src);
      return;
}

this function refreshes the html Webresource and also set label on it and also set arrStatusProgress  variable on parent javascript which later is used inside the html webresource by using window.parent[arrStatusProgress ]

The problem that I have is that, this code used to work correctly on CRM2011 but not on CRM365 and it throws following error which it hits wrControl.setSrc(src)

Unable to get property 'location' of undefined or null reference.



Please note that : The legacy rendering is checked in system setting.

I really confused and not sure how to fix  the issue as getSrc and setSrc are valid functions in sdk!

Any help would be greatly appreciated.


Viewing all articles
Browse latest Browse all 82002

Latest Images

Trending Articles



Latest Images