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)

Iframes in dynamics online

(0) ShareShare
ReportReport
Posted on by

I'm trying to implement the use of an iframe to display a webpage from an outside website (more specifically, a form on that website) on a custom entity's form. I am having no luck with iframes, and the documentation out there is not helping. I've tried both an iframe and an html web resource with an iframe tag in a div. The only success I've had is getting a youtube video to show up. Otherwise, I am getting a blank iframe. When I inspect the frame source, I am getting a blank page (other than the youtube embed I tried). I've tried inserting a variety of urls, all to no avail. Is there any particular magic on working with iframes in dynamics? Am I missing something obvious? Thanks for any help.

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    Nick.Doelman Profile Picture
    1,947 Most Valuable Professional on at

    Might be an issue with the source site not allowing itself to be displayed in an Iframe, for example www.google.com will not allow itself to be embedded in an Iframe.

    Years ago (CRM 4.0, I think) I needed to set the URL via Javascript because just setting it on the control wouldn't work:

    Xrm.Page.getControl(<<iFramename>>).setSrc("www.somewebsite.com");

    Just some ideas...

    Cheers

    Nick

  • Suggested answer
    Mahadeo Matre Profile Picture
    17,021 on at

    When websites has X-Frame-Options set , then depending on option those websites are shown iframe.

    developer.mozilla.org/.../X-Frame-Options

    if you try microsoft website url like

    www.microsoft.com/.../ebooks-and-videos.aspx

    it will work in Iframe

  • fishyjj Profile Picture
    on at

    Thanks for your reply. The ms website you referenced did work in my iframe. Is there a way to set that x-frame-option on a website that I do not myself run?

  • Suggested answer
    Mahadeo Matre Profile Picture
    17,021 on at

    x-frame-option is security option and I don't think so you will able to bypass this option for websites you don't run.

    For the content / pages/ websites you want to show on CRM entity form, instead of displaying them in Iframe, you can create HTML web resource with button, add this web resource in CRM entity form and open page/website in different window from web resource button using window.open

  • fishyjj Profile Picture
    on at

    Is there a way to use window.open to then pass data between the two webpages? The two pages being the CRM form and the webpage I want to open?

  • Suggested answer
    Mahadeo Matre Profile Picture
    17,021 on at

    To open CRM entity form you can Xrm.Utility.openEntityForm.  In this function you can pass parameters also.

    Here are more detailed information about openEntityform

    mahadeomatre.blogspot.com/.../xrmutility-functions-openentityform.html

    msdn.microsoft.com/.../jj602956.aspx

    and for web pages you can use query string to pass data.

  • fishyjj Profile Picture
    on at

    Thanks. Now what if the webpage or form that's opening is not a crm form, but a form from another site? Is there any reliable way to pass data between the crm and this form?

  • Suggested answer
    Mahadeo Matre Profile Picture
    17,021 on at

    you can query string to pass data

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