Hello Experts,
We have HTML webresource as an IFrame on CRM Form, its simple HTML where we need to add html content to body dynamically. The code is working on CREATE form but same line of code won't work for UPDATE form. Below are codes.
HTML Web-resource :
<!DOCTYPE html>
<html><head><meta charset="UTF-8"></head>
<body style="font-family: Tahoma; font-size: 12px; margin-top: 0px; -ms-word-wrap: break-word;" bgcolor="#f6f8fa"><br></body></html>
JS Code :
document.getElementById('WebResource_HeaderText').contentDocument.body.innerHTML = headerText;
OR
var customHtml = Xrm.Page.ui.controls.get("WebResource_HeaderText");
var destination = customHtml.getObject().contentWindow.document;
destination.body.innerHTML = headerText;
headerText:
<b>Hello World! </b><font>- Please choose option : <br>
<ul>
<li>A</li>
<li>B</li>
<li>C</li>
<li>D</li>
<li>E</li>
<li>F</li>
</ul></font>
Please help, if anyone know about this.
Regards,
Rahul
*This post is locked for comments