Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics CRM (Archived)

Saving IFrames in OnSave function of a form.

Posted on by 550

Hi,

I need to migrate this old version of code to dynamics 365. The function saves the IFrames in OnSave functionality.As window.parent  is not supported in dynamics crm 365 what are the other possible ways to adopt this code?. Here I assume that mainWnd.frames.length returns the number of IFrames present)

var mainWnd = window.parent;

        for (var iCnt = 0; iCnt < mainWnd.frames.length; iCnt++) {

            if (mainWnd.frames[iCnt].save) {

                mainWnd.frames[iCnt].save();

            }

        }

Thanks in advance..

*This post is locked for comments

  • David Jennaway Profile Picture
    David Jennaway 14,063 on at
    RE: Saving IFrames in OnSave function of a form.

    You can call Xrm.Page.ui.controls to get all the controls on the form, then iterate through the results and call getControlType for each. Any IFrame control will have a return value of 'iframe'. Then call getObject() on the IFrame control to get the IFrame DOM object

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,269 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,198 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans