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

  • Verified answer
    Arpit Shrivastava Profile Picture
    Arpit Shrivastava 7,518 User Group Leader on at
    RE: Refresh HTML Web Resource after Save

    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

     

  • Suggested answer
    gdas Profile Picture
    gdas 50,089 on at
    RE: Refresh HTML Web Resource after Save

    Hi ,

    You can also check below reference

    community.dynamics.com/.../232589

  • Suggested answer
    gdas Profile Picture
    gdas 50,089 on at
    RE: Refresh HTML Web Resource after Save

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

  • Suggested answer
    gdas Profile Picture
    gdas 50,089 on at
    RE: Refresh HTML Web Resource after Save

    Hi ,

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

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

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Vahid Ghafarpour – Community Spotlight

We are excited to recognize Vahid Ghafarpour as our February 2025 Community…

Tip: Become a User Group leader!

Join the ranks of valued community UG leaders

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 292,494 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 231,309 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans