Suppose we have an html page having an iframe that shows a crm record. If we want to access the attributes on the form or call the save function from our html page, we can do it in the following manner.
var crmForm =document.getElementById("myIframe").contentWindow.document.getElementById("contentIFrame").document.frames[0].document.forms['crmForm'];
var XrmPage =document.getElementById("myIframe").contentWindow.document.getElementById("contentIFrame").document.frames[0].Xrm.Page;
Hope it helps.
Discover more from Nishant Rana's Weblog
Subscribe to get the latest posts sent to your email.
