Reputation:
In this discussion, a solution is suggested by referral to the name of an IFRAME as "IFRAME_name".
I'd like to know how I'm supposed to obtain that name in my CRM.
EDIT: The component I'm talking about looks like an IFRAME but is, in fact, a web resource (a HTML document inside CRM, i.e. not an external page). When I refer from it to CRM stuff, I go
parent.window.Xrm.Page + the usuals
but how can i refer from the CRM down to that component?
Upvotes: 0
Views: 372
Reputation: 2170
Use:
console.dir(Xrm.Page.data.entity.attributes)
and then press F12 to open the console to inspect the object. The console must be open on the page for the console variable to be recognized, so I usually refresh the page with the console open.
Use:
var iFrame = descriptionIFrame.contentDocument
|| descriptionIFrame.contentWindow.document;
to access the IFRAME content, where descriptionIFrame is a reference to an IFRAME object.
Upvotes: 0
Reputation: 17562
When you create the IFrame on the form you set a name.
Open the form customisations and read the name from there.
Upvotes: 5