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)

Using Web Resource to create a button to reload the page

(0) ShareShare
ReportReport
Posted on by 210

I have a form that needs to be manually updated via a button click.  Based on items found I wrote the following web resource that I added to my form.  Not one of the three options are actually doing a page refresh (I can tell as my form contains a view that should have an additional record added to it).  Where am I going wrong?  If there is some other way to do this I am willing to try it.  Best Regard - Diane

<html><head>
<title></title>
<meta charset="utf-8"></head>
<body>
<button onclick="refreshPage_OnClick()">Refresh</button>
<script>
function refreshPage_OnClick()
{
alert("HI");
//window.location.reload(true); <==does nothing
Xrm.Page.data.refresh(); <==This one throws a javascript error
//document.getElementById('Negotiations').control.refresh();<==This one throws a javascript error
alert("Bye");

}
</script>
</body></html>


*This post is locked for comments

I have the same question (0)
  • Verified answer
    Community Member Profile Picture
    on at

    try

    parent.Xrm.Page.data.refresh();

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