web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

Read Iframe content in MS CRM 2015 update 1 online

(0) ShareShare
ReportReport
Posted on by

Hello, 

I need to read Iframe content I tried below way but it's showing error "onreadystatechange" function of Iframe.

Line 1 : var childiFrame = Xrm.Page.getControl("IFRAME_Name").getObject();
Line 2 : var innerDoc = childiFrame.contentDocument || childiFrame.contentWindow.document;

I checked it through developer tool of browser both values "childiFrame.contentDocument" & "childiFrame.contentWindow.document" is getting Null/Undefined in CRM 2015.

Your help is appreciated.

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    Community Member Profile Picture
    on at

    Can you try parent.window.Xrm.Page.data.entity.attributes.get("my_name").getValue();

    Mansoor

  • Community Member Profile Picture
    on at

    No Mansoor, I tried parent.window.Xrm.Page.data.entity.attributes.get("IFRAME_Name").getValue() but it's not working.

  • Community Member Profile Picture
    on at

    Thanks Mansoor for your quick response.

    I tried parent.window.Xrm.Page.data.entity.attributes.get("IFRAME_Name").getValue() but it's not working.

  • Verified answer
    Community Member Profile Picture
    on at

    I think, it will not work in if you are using CRM 2015 Online update 1.

    You can read more about this below.

    blogs.msdn.com/.../microsoft-dynamics-crm-online-2015-update-1-new-form-rendering-engine.aspx

    "Examples of things that will break:

    Any attempt to access DOM in the content iframe using JS, jQuery or other 3rd party libraries (document.getElementById() or jQuery selectors)

    "

    Mansoor

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
SA-08121319-0 Profile Picture

SA-08121319-0 4

#1
Calum MacFarlane Profile Picture

Calum MacFarlane 4

#3
Alex Fun Wei Jie Profile Picture

Alex Fun Wei Jie 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans