Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics CRM (Archived)

Dynamically changing content of web page in a IFrame not working

Posted on by Microsoft Employee

I have (I think) a fairly easy question, I have created a web page in C# using some of the Dynamics components to retrieve data from my Dynamics 365 Online environment. The page contains a DropDown with lead entities, which are retrieved during the onLoad event.

When I change the dropdown value (onChange event), the data of the selected lead is begin retrieved and displayed by filling some data on the front end / html (aspx) page and the panel which contains the data is set to visible (initially this is set to false). 

This works fine when calling the page the normal way (in my web browser) but fails when I use it in a IFrame on my Dashboard. The dropdown with the lead entities is being showed and filled correctly, but it seems the onChange event is never executed.

I am probably doing something obvious wrong but I cant figure out what it is.

*This post is locked for comments

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Dynamically changing content of web page in a IFrame not working

    Brite Global

    After fixing the http problem I can now see a clear error when I do a post (execute the event), which is:

    Blocked script execution in '<URL>' because the document's frame is sandboxed and the 'allow-scripts' permission is not set.]
    

    After reading some more about it I came across the following post about the same error: 

    https://community.dynamics.com/crm/f/117/t/152041

    Here they advised to uncheck the "restrict cross frame origin" box and so I did, this didn't helped however, which the OP of above post mentioned as well... 

  • Clem Profile Picture
    Clem 2,541 on at
    RE: Dynamically changing content of web page in a IFrame not working

    In addition, maybe i misunderstood the need here , but why do you just go for a HTML/JS file embedded in the CRM to be in the same context.

    Example : msdn.microsoft.com/.../gg328541.aspx

    Clément

  • Aric Levin Profile Picture
    Aric Levin 30,188 on at
    RE: Dynamically changing content of web page in a IFrame not working

    Can you check your cross browser settings? Also possibly related to mixed environment http and https.

    Besides that, it would be hard to give you and exact reason.

    You can do some further investigation using Fiddler or the Browser Developer Tools (F12).

    Hope this helps.

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,280 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,214 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans