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 on CRM Forms when viewed using Outlook App

(0) ShareShare
ReportReport
Posted on by

I have a CRM form with an IFrame on it. The frame is pointing to an Angular application hosted outside of CRM.

When viewed in CRM, it works as expected.

When the form is viewed using the Outlook App via the Outlook Web Client, it works as expected.

When the form is viewed using the Outlook App via the IOS Outlook App, it works as expected.

When the form is viewed using the Outlook App via the "Thick" Outlook Client - the frame doesn't load properly. Using Fiddler, I can see it loads the JS resources on the IFrame page but it doesn't appear to execute them.

I've done some testing and it appears the Outlook Thick Client is running the CRM form in some kind of restricted/sandboxed mode.

Does anyone know if this is the case, or if there is any documentation around it.

This is on a CRM v9 Online Organisation.

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    Florian Popescu Moscu Profile Picture
    160 on at

    iFrames are not loaded in Dynamics 365 for Outlook reading pane, as mentioned here: https://docs.microsoft.com/en-us/dynamics365/customer-engagement/developer/use-iframe-and-web-resource-controls-on-a-form

    Are you viewing the record in the reading pane or in a new window?

  • Spencer Clark Profile Picture
    on at

    This is from the new Dynamics 365 "App" (not the old COM-based Outlook Add-In)... Does the "Reading Pane" relate to the old Outlook Add-In?

    In the below screenshot - the IFrame is supposed to be where I have drawn the red marks - it doesn't show well on the screenshot but the iframe is there in the DOM as its background colour is slightly off-white, and using Fiddler I can see the iframed page being loaded, plus is resources.

    6177.outlook-2.PNG

    In the Outlook Web version it is working as expected - see below:

    6177.outlook-2.PNG

  • Verified answer
    Spencer Clark Profile Picture
    on at

    Just in case anyone else comes across this in the future - the problem is actually an issue inside Angular (5+) with its compatibility with Internet Explorer when used inside a WebControl hosted in a WinForms application.

    It is trying to use the Browser History API to manipulate the history stack - and as this control does not have back and forward buttons, it throws an unhandled error deep inside the angular framework.

    See the following for some solutions:

    github.com/.../22709

    github.com/.../502

    github.com/.../17843

    github.com/.../8834

    github.com/.../8890

    github.com/.../21062

    Once I resolved this, the Iframe rendered exactly as expected inside the Outlook Application.

  • Spencer Clark Profile Picture
    on at

    Further, this is the solution that worked for me - placing this code into the index.html of the angular application:

    var isIE = /*@cc_on!@*/false || !!document.documentMode; // Internet Explorer 6-11
    if(isIE){
    	try {
    		window.history.replaceState(this.state, document.title, this.location.hash);
    	}
    	catch(err) {
    		window.history.pushState = undefined;
    	}
    	
    }

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