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 CRM (Archived)

Refresh HTML Web Resource after Save

(0) ShareShare
ReportReport
Posted on by 210

Hi Experts,

I have an HTML web resource that loads during the onload of a form.  If the formtype is 1 it does not build anything otherwise the HTML web resource loads a table of data from the existing record.

It looks like the behavior of the save on a form does not load the HTML web resource without trickery.

I put the following code in my OnSave of my form but the alert in my HTML web resource that says "HI" is not showing.  Any guidance would be appreciated.

OnSave runs:

function refreshWebResArea() {
    var webResArea = Xrm.Page.ui.controls.get("WebResource_ContractChangeStatusBar");
    webResArea.setSrc(webResArea.getSrc());
}


*This post is locked for comments

I have the same question (0)
  • Suggested answer
    gdas Profile Picture
    50,091 Moderator on at

    Hi ,

    Seems you need to use setTimeout so that after page load html webresource will be load with data.

  • Suggested answer
    gdas Profile Picture
    50,091 Moderator on at

    And also call the function in form onload event  as well.

  • Suggested answer
    gdas Profile Picture
    50,091 Moderator on at

    Hi ,

    You can also check below reference

    community.dynamics.com/.../232589

  • Verified answer
    Arpit Shrivastava Profile Picture
    7,518 User Group Leader on at

    Hello,

    Use below code in order to refresh the web resource:

    var webResourceControl = Xrm.Page.getControl("WebResource_ContractChangeStatusBar");
    var src = webResourceControl.getSrc(); 

    webResourceControl.setSrc(null);

    webResourceControl.setSrc(src);

    If my answer helped to resolve your issue, kindly verify it by clicking 'Yes'. It would be helpful to the other community members seeking to resolve a similar issue.


    Cheers
    Arpit
    https://arpitmscrmhunt.blogspot.in

     

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 CRM (Archived)

#1
SA-08121319-0 Profile Picture

SA-08121319-0 4

#1
Calum MacFarlane Profile Picture

Calum MacFarlane 4

#3
Alex Fun Wei Jie Profile Picture

Alex Fun Wei Jie 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans