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)

Javascript to interact with main form from editable grid

(0) ShareShare
ReportReport
Posted on by 3,079

I have a rollup field that I want to update on screen right away when people make changes in the child entity via editable grid.  I have a plugin that triggers the auto-recalc, and that's working fine.  (Ended up writing my own so that I could make it re-calc after a record is deleted as well, which the workflow activity version that is often used doesn't do.)  However, making it show up on screen is again tricky.  Had this mostly figured out with a read-only grid, but now that we're changing to editable it's being problematic.

I have javascript that attaches to the onLoad of the grid that checks if the screen version and the one on the record are different, and updates the screen if so.  Since it's onLoad, this fires and works perfectly when a record is added.  The update and delete are proving much more challenging, though.

For updates, I know I can attach something to the onSave of the grid, so I can trigger on the changes.  However, I haven't yet been able to find the context permutation that allows me to read the main form from within the grid context, or to refresh the data on the main form.

And deletes - I'm starting to think this one isn't possible, but wanted to double check to see if I'm missing anything.  I can't find a single event to trigger off of when an item is deleted.  The onLoad doesn't fire, the onSave doesn't fire...the only way would basically to put a timer on the main form itself that just periodically checks, and I definitely don't want to have to do that.

So - any listener I'm missing on the delete?  Or any pointers on how to access the parent context from within the grid?

*This post is locked for comments

I have the same question (0)

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