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 :
Customer experience | Sales, Customer Insights,...
Suggested Answer

Display iFrame on Entity form to show D365 portal.

(0) ShareShare
ReportReport
Posted on by

Hi All,

I have a business scenario to have an iFrame on Entity form where I need to display large amount of text (Terms and Conditions and Privacy Statements) in D3465 portal which the user can read and then click on check box to agree it's terms and condition. 

                   pastedimage1580106711374v2.png

                  

Could you please let me know if this is doable and how this can be achieved in D365 portal. Thank you very much for your help in advance!

Regards,

Leo

I have the same question (0)
  • Suggested answer
    Nicholas Hayduk Profile Picture
    2,863 on at

    Yes this is doable - you'll need to use JavaScript.

    Typically in this situation I'll put a section on the form, and then by adding JavaScript via the Custom JavaScript field, you can easily target that section and add the required IFrame.

    Nick

  • LeoFernandas Profile Picture
    on at

    Hi Nick,

    Thank you for answering my questions! Yes, I did try this out by adding a section an CRM form and adding iFrame on it. However, I see only name of the section but didn't get iFrame.

    Could you please share JavaScript that is to have iFrame on Entity form from portal side.

    Thank you very much for your guidance in advance! :)

    - Leo

  • Suggested answer
    Nicholas Hayduk Profile Picture
    2,863 on at

    Something like this should get you started (put it in the Custom JavaScript attribute on the Entity Form, and update to match the name of the section and the URL you want):

    $(document).ready(function() {

     $('[data-name="CONTACT_INFORMATION"').append($('<iframe>').attr('src', 'yoururl'));

    });

    Nick

  • Fubar Profile Picture
    2,761 on at

    You can also use a Webresource.  Put the CRM Webresouce with the HTML etc that you need in it on the Form in CRM, on the settings for the Portal Form there is a tickbox to render Webresouces (by default it is off).

  • LeoFernandas Profile Picture
    on at

    Hi Nicholas,

    Thank you for suggesting me this work around! When I try this code out with my portal, I was able to find iFrame with appropriate content of particular URL. However, this does allow only my current portal URL while the other URL doesn't display as it pops up a message that "refused to connect".

    Also, my business logic is to show large amount static texts as there is no specific URL/website where this text could be found.

    Could you please help me how we can display only that static text if we don't any website/URL.  

    - Leo

  • Nicholas Hayduk Profile Picture
    2,863 on at

    For IFRAMEs, it depends on how the site you're trying to embed is configured.  It's possible to block other sites from putting your content in an IFRAME using the HTTP/X-Frame-Options header, so my guess is that the site you tried does that.

    If you just want to put a bunch of static text, you could create a simple page on your portal with that text, and then embed using the IFRAME technique.  Or you could just embed a div with that static text on the form using JavaScript (so instead of adding an IFRAME, just add the content itself).  You could use a combination of Liquid and Content Snippets to manage that content within Dynamics.

    Nick

  • LeoFernandas Profile Picture
    on at

    Hi Nick,

    Thank you very much for taking time from your busy schedule to answer my question! I'm able to include whole text inside iFrame by creating a web resource in CRM where I just pasted the whole text in Rich Text Editor and call that web resource URL from iFrame. But I has to enable one setting on that particular entity form to let portal render web resource that is "Render Web Resource inline" under additional settings section from CRM side.

    Leo

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 > Customer experience | Sales, Customer Insights, CRM

#1
Tom_Gioielli Profile Picture

Tom_Gioielli 81 Super User 2025 Season 2

#2
Gerardo Rentería García Profile Picture

Gerardo Rentería Ga... 49 Most Valuable Professional

#3
#ManoVerse Profile Picture

#ManoVerse 40

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans