Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics CRM (Archived)

dynamics 365 online -subgrid refresh not working proper

Posted on by 1,075

Hi All,

I am using below javascript code to refresh subgrid, but some time it refresh and some time it does not.

var subgrid = Xrm.Page.ui.controls.get("Sources");
subgrid.refresh();

I have also tried below code but still not working.

//document.getElementById("Sources").control.refresh();

Thanks in advance

*This post is locked for comments

  • Suggested answer
    Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: dynamics 365 online -subgrid refresh not working proper

    Ok then could you try it with a time out like 100ms?

  • Suresh Sorde Profile Picture
    Suresh Sorde 1,075 on at
    RE: dynamics 365 online -subgrid refresh not working proper

    Thanks Guillaume,

    Right click refresh work on grid, but i want that in button click.

  • Suggested answer
    Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: dynamics 365 online -subgrid refresh not working proper

    Just to be sure if you right click on the subgrid and select refresh list. Does your new data appear?

    If yes, I would recommend to teach the CRM user to use this OOB functionality instead of creating 1000 of custom buttons :)

  • Suresh Sorde Profile Picture
    Suresh Sorde 1,075 on at
    RE: dynamics 365 online -subgrid refresh not working proper

    Thanks Thomas, I want to refresh the subgrid only.

  • Suggested answer
    Thomas David Dayman Profile Picture
    Thomas David Dayman 11,323 on at
    RE: dynamics 365 online -subgrid refresh not working proper

    You can use this piece of code instead. It will completely refresh the page for you.

    Xrm.Utility.openEntityForm(Xrm.Page.data.entity.getEntityName(), Xrm.Page.data.entity.getId());

  • Suresh Sorde Profile Picture
    Suresh Sorde 1,075 on at
    RE: dynamics 365 online -subgrid refresh not working proper

    I am using dynamics 365 online version. I have added custom button on form for save value in subgrid. On click of save button data saved to subgrid but do not refresh by code. I need to manually refresh the form then it show added record in subgrid.

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: dynamics 365 online -subgrid refresh not working proper

    Hi,

    We need more info. Which version of CRM are you using? When do you trigger the refresh? OnSave event, onLoad, by clicking a button(like described here: butenko.pro/.../ms-crm-2011-how-to-refresh-associated-or-subgrid-from-ribbon-button)?

    Best

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,280 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,214 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans