Answered by:
Showing external website in an IFrame in Dynamics 365 Form

Question
-
Hello Devs,
Help please.
I remember I have read that we can display external websites on a CRM form using an IFrame.
So I have just simply added an IFrame to the form, set the URL to https://www.google.com (in design mode), remove the cross frame scripting security check. But it is not showing google page in an IFrame.
Error message in IE:
This content cannot be displayed in a frame. To help protect the security of information you enter into this website, the publisher of this content does not allow it to be displayed in a frame.
Error message in Chrome:
Refused to display '<URL>' in a frame because it set 'X-Frame-Options' to 'sameorigin'.
I also tried adding https://www.google.com and https://www.google.com.pk in the trusted sites zone.
Ultimately, I need to show a sharepoint document (image) on CRM form.
Reference: https://blogs.msdn.microsoft.com/emeadcrmsupport/2013/08/16/cross-domain-iframe-requests-from-crm-online-are-blocked-in-sharepoint-online/
blog: http://technologynotesforyou.wordpress.com
Friday, September 15, 2017 5:53 PM
Answers
-
If you're using Sharepoint Online I'm afraid you will no be able to do that but if you're onprem you will have to make following modification - https://social.msdn.microsoft.com/Forums/office/en-US/27cbd974-d19d-4c4c-8e55-e73810452773/how-to-embed-sharepoint-site-on-simple-html-page-iframe?forum=sharepointdevelopment
Also check this - https://blogs.msdn.microsoft.com/officeapps/2012/12/12/iframing-sharepoint-hosted-pages-in-apps/
Dynamics CRM/Business Solutions MVP
Read My blog
- Proposed as answer by Andrii ButenkoMVP, Moderator Friday, September 15, 2017 7:18 PM
- Edited by Andrii ButenkoMVP, Moderator Friday, September 15, 2017 7:21 PM
- Marked as answer by Khadim Ali Monday, September 18, 2017 12:27 PM
Friday, September 15, 2017 7:18 PMModerator
All replies
-
Hello,
Have you tried to point your IFrame to sharepoint and not google? Google website just doesn't allow to embed itself to internal websites.
Dynamics CRM/Business Solutions MVP
Read My blog- Proposed as answer by Andrii ButenkoMVP, Moderator Friday, September 15, 2017 6:38 PM
Friday, September 15, 2017 6:38 PMModerator -
Yes, at first I was trying with SharePoint itself. But the outcome was same.
blog: http://technologynotesforyou.wordpress.com
Friday, September 15, 2017 6:45 PM -
Hello,
I tried with LinkedIn and it failed. Then I tried with a local newspaper website and it PASSED :).
So apparenlty, it seems any security check or so from SharePoint website side?
blog: http://technologynotesforyou.wordpress.com
Friday, September 15, 2017 7:09 PM -
If you're using Sharepoint Online I'm afraid you will no be able to do that but if you're onprem you will have to make following modification - https://social.msdn.microsoft.com/Forums/office/en-US/27cbd974-d19d-4c4c-8e55-e73810452773/how-to-embed-sharepoint-site-on-simple-html-page-iframe?forum=sharepointdevelopment
Also check this - https://blogs.msdn.microsoft.com/officeapps/2012/12/12/iframing-sharepoint-hosted-pages-in-apps/
Dynamics CRM/Business Solutions MVP
Read My blog
- Proposed as answer by Andrii ButenkoMVP, Moderator Friday, September 15, 2017 7:18 PM
- Edited by Andrii ButenkoMVP, Moderator Friday, September 15, 2017 7:21 PM
- Marked as answer by Khadim Ali Monday, September 18, 2017 12:27 PM
Friday, September 15, 2017 7:18 PMModerator -
Do we have any other way to surface a SharePoint hosted image document on a D365/CRM form?
blog: http://technologynotesforyou.wordpress.com
Friday, September 15, 2017 7:39 PM -
I don't see any easy way then develop that functionality from a scratch.
Dynamics CRM/Business Solutions MVP
Read My blogFriday, September 15, 2017 7:48 PMModerator