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 :
Customer experience | Sales, Customer Insights,...
Unanswered

Updating Parent Record on delete of editable Sub-grid record

(0) ShareShare
ReportReport
Posted on by 18

I have a parent record (budget) that I need to have a live update on the total of the child records (budget items). Each time the a Budget Item is updated/added/removed, I need to the parent records to update the total. This needs to be done on the parent (budget) form in real time with the budget items being in an editably sub-grid.

I tried the following code

var gridContext = formContext.getControl('EditableSubGridName');//Verify the subgrid is loaded, if not recursively call function againif (gridContext != null && gridContext != undefined) {    gridContext.addOnLoad(CalculateTotal);}

The above only gets called on a Save, it is not triggered on a deletion of a sub-grid record.

I have the same question (0)
  • Leah Ju Profile Picture
    Microsoft Employee on at
    Hi Partner,
    Sometimes sub-grid take more time to load onto the form than other controls, try adding the setTimeout() function to ensure that if your javascript code is executed before the control is available, we will wait and then try to attach the event to the control again.
    Please refer to the following links for more details:
    Make sure that add the CalculateTotal function that you used in addonLoad() to the subgrid OnLoad event.

    I hope you can verify my answer if it helps you! If you have any questions, please feel free to contact me.
    Regards,
    Leah

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 > Customer experience | Sales, Customer Insights, CRM

#1
Tom_Gioielli Profile Picture

Tom_Gioielli 108 Super User 2025 Season 2

#2
Jimmy Passeti Profile Picture

Jimmy Passeti 50 Most Valuable Professional

#3
Gerardo Rentería García Profile Picture

Gerardo Rentería Ga... 49 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans