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

  • LeoFernandas Profile Picture
    on at
    RE: Display iFrame on Entity form to show D365 portal.

    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

  • Nicholas Hayduk Profile Picture
    2,863 on at
    RE: Display iFrame on Entity form to show D365 portal.

    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
    RE: Display iFrame on Entity form to show D365 portal.

    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

  • Fubar Profile Picture
    2,752 on at
    RE: Display iFrame on Entity form to show D365 portal.

    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).

  • Suggested answer
    Nicholas Hayduk Profile Picture
    2,863 on at
    RE: Display iFrame on Entity form to show D365 portal.

    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

  • LeoFernandas Profile Picture
    on at
    RE: Display iFrame on Entity form to show D365 portal.

    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
    RE: Display iFrame on Entity form to show D365 portal.

    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

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

🌸 Community Spring Festival 2025 Challenge Winners! 🌸

Congratulations to all our community participants!

Adis Hodzic – Community Spotlight

We are honored to recognize Adis Hodzic as our May 2025 Community…

Kudos to the April Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard > Customer experience | Sales, Customer Insights, CRM

#1
Daivat Vartak (v-9davar) Profile Picture

Daivat Vartak (v-9d... 225 Super User 2025 Season 1

#2
Muhammad Shahzad Shafique Profile Picture

Muhammad Shahzad Sh... 106

#3
Vahid Ghafarpour Profile Picture

Vahid Ghafarpour 82 Super User 2025 Season 1

Overall leaderboard

Product updates

Dynamics 365 release plans