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?