Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

Editable subgrid save and refresh forcefully using JavaScript

(0) ShareShare
ReportReport
Posted on by

I want to Save and refresh editable subgrid. anyone have any idea about it how can i do this using JavaScript

Thanks in Advanced

*This post is locked for comments

  • ASukiasyan Profile Picture
    ASukiasyan 10 on at
    RE: Editable subgrid save and refresh forcefully using JavaScript

    Hi, can you please give an example of how to do it?

  • Divya Bharti Profile Picture
    Divya Bharti 55 on at
    RE: Editable subgrid save and refresh forcefully using JavaScript

    Hi You can use API call to save subgrid on OnChange event of Subgrid.

    and refresh by gridcontrol.refresh(); command at the end

  • sandeepc Profile Picture
    sandeepc 5,078 on at
    RE: Editable subgrid save and refresh forcefully using JavaScript

    onload

  • Pravesh Rai Profile Picture
    Pravesh Rai on at
    RE: Editable subgrid save and refresh forcefully using JavaScript

    Where i have to applied it, i mean which events

  • Suggested answer
    sandeepc Profile Picture
    sandeepc 5,078 on at
    RE: Editable subgrid save and refresh forcefully using JavaScript

    function refreshFormAfterInitialSave() {  

        if (Xrm.Page.ui.getFormType() == 1) {  

          top.callN = 1;  

        }  

        if (Xrm.Page.ui.getFormType() == 2 && top.callN == 1) {  

           setTimeout(function () {          

            top.callN = null;

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

          }, 2000);

        }  

    //////////////////////////////////////////  

    OnLoad: function (context) {  

          //set id for first call after save  

          refreshFormAfterInitialSave();  

        },  

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,307 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans