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 :
Microsoft Dynamics 365 | Integration, Dataverse...
Answered

Reload iframe on UCI

(0) ShareShare
ReportReport
Posted on by 15

Hi.

We have an iframe, which when we click on a button (ribbonworkbench), it needs to refresh iframe. 

UCI can't do this, even solution given in other site.

Old way:

var webResourceControl = Xrm.Page.getControl("WebResource_quotedetails");
var src = webResourceControl.getSrc();
webResourceControl.setSrc(null);
webResourceControl.setSrc(src);

Way I tried:

var webResourceControl = Xrm.Page.getControl("WebResource_quotedetails");
var src = webResourceControl.getSrc();
webResourceControl.setSrc(null);

var url = Xrm.Utility.getGlobalContext().getClientUrl() + "/WebResources/";
var newsrc = null;
if (src.indexOf(url) != 0) {
newsrc = url + src;
}
else {
newsrc = "plab_quotedetail";
//newsrc = src;
}
webResourceControl.setSrc(newsrc);

Could you help me? Thanks.

I have the same question (0)
  • Verified answer
    cloflyMao Profile Picture
    25,210 on at

    Hi mystictapion,

    It's a known issue in UCI, you can find discussion about it in link below:

    https://github.com/MicrosoftDocs/dynamics-365-customer-engagement/issues/912

    bservulo's answer(the second reply) could work in UCI from my test.

    It will get iframe object <iframe id="xxx" src="xxx">...</iframe> and set src attribute directly.

    So in UCI, we could execute different refresh function.

    if (Xrm.Internal.isUci()) {
        var webResourceControl = Xrm.Page.getControl("WebResource_xxx");
        var iframeSrc = Xrm.Page.getControl("WebResource_xxx").getSrc();
        webResourceControl.getObject().src = "about:blank";
        webResourceControl.getObject().src = iframeSrc;
    }
    

    Regards,

    Clofly

  • Verified answer
    cloflyMao Profile Picture
    25,210 on at

    Hi mystictapion,

    Is it working for you?

    Regards,

    Clofly

    Please kindly mark as verified if you had found any answer helped, it would be really appreciated.

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 > Microsoft Dynamics 365 | Integration, Dataverse, and general topics

#1
Siv Sagar Profile Picture

Siv Sagar 93 Super User 2025 Season 2

#2
#ManoVerse Profile Picture

#ManoVerse 76

#3
Martin Dráb Profile Picture

Martin Dráb 64 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans