I have a external HTML web resource which is placed onto contact form. During the on-load event of contact form, the below statement of the code does not work ( it should alert the HTML document object)
it throws an error as below.
Unable to get property 'contentWindow' of undefined or null reference
function Contact_OnLoad() {
showHidePostalAddressWebResource();
}
Function showHidePostalAddressWebResource(){
var htmlcontent = Xrm.Page.getControl('WebResource').getObject().contentWindow.document;
alert(htmlcontent);
}
it only happens in Unified Interface not in Web Client. Can anyone please suggest any alternative statement for above code ?
*This post is locked for comments
I have the same question (0)