Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics CRM (Archived)

How to control the refresh a page when I update the subgrid

Posted on by Microsoft Employee

Hello, I have the same problem, I tried the following code and run.

function onLoad() {

 setTimeout("refresh();", 2500);

}

function refresh() {

 Xrm.Page.getControl("contactopportunitiesgrid").addOnLoad(GridOnloadFunction);

}

var GridOnloadFunction = function () {

 Xrm.Page.data.refresh(true);

};

But I have the following problem, the grid refreshes several times, when it should do so only once.

They know how I can control this?

*This post is locked for comments

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: How to control the refresh a page when I update the subgrid

    thank you very much, I was looking for this for a long time, I've managed to solve my problem

  • Suggested answer
    vinod shivoor Profile Picture
    vinod shivoor 1,225 on at
    RE: How to control the refresh a page when I update the subgrid

    Hi

    Whenever the values in the sub grid is changed the form gets loaded once . Please check on load of the form if you have any Java Script which refresh, save the form once again . this will cause grid refreshes several times.

  • Verified answer
    Inogic Profile Picture
    Inogic 24,094 on at
    RE: How to control the refresh a page when I update the subgrid

    Hi,

    Below blog explains how to Identify the trigger of an On-load event for Sub-grid in Dynamics CRM in order to execute a function only once when records are added or removed to sub-grid.

    http://www.inogic.com/blog/2015/11/identify-the-trigger-for-an-on-load-event-for-sub-grid-in-dynamics-crm/

    Thanks!

    Sam 

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