-
Notifications
You must be signed in to change notification settings - Fork 238
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Object related to itself does not seem to work #10
Comments
Ah, scratch that. I was misunderstanding how the trigger understood what it needed to do. I was assuming that by creating the relationship (that is, by populating ParentId) the parent account would be updated to reflect the NumberOfEmployees on the newly related account. I seems that you must modify the field that is being rolled up. |
Yes thats correct, it has some optimisations in it to compare the rollup field for changes and thus avoid excessive queries if nothing has actually changed. Are we cool to close this issue you think? |
I think so. It would be nice to have the rollups recalculated if a relationship is added/deleted, as that's my initial use case for this. But, also understand how intensive that may be. |
I am working at present on the Calculate and Schedule modes, just got back from a long US trip, so maybe next weekend for release. In the meantime, when you say 'recalculated if a relationship is added/deleted', can you clarify the steps, i think i know what you mean, just want to confirm. Thanks! |
So, per the screenshot I attached, I was expecting that creating a new relationship between two accounts (using the ParentID field) would recalculate TotalEmployees__c on the parent account if I populated ParentID on the child account. Similarly, if I removed the relationship (set ParentID to null) or changed it (set ParentID to some other account) I would expect the rollup to be recalculated for all of the involved accounts. A simpler version of my use case is to think about tallying number of employees for Starbucks. Starbucks corporate is the parent with local stores as children. If I learn about a new store, I can add it to Salesforce with the number of Employees, set the ParentID to Starbuck Corporate, then sen the TotalEmployees__c field on the corporate account update with a new total. |
Ah I understand, this is a bug in my view, i'll take a look, thanks! |
Taking a look at this now! :-) |
Good news, i've just committed a fix for realtime mode to support re-parenting, it will be released in the next package release when i complete the schedule mode (partially implemented in this latest commit also), which will hopefully be out very soon! |
That's awesome! Looking forward to giving it a test drive. Mike
|
I've just released v1.6, see the Readme and my blog for details! :-) |
Andrew - I'm working on a rollup that is working in the normal sense of parent child objects. But my parent object is Accounts and my record has a Parent Account. How come the rollup isn't calculating the total sum of child records (across all the child accounts) on the Parent record? does this functionality work? I JUST installed the tool today on the org so it's the latest and greatest version! Please advise. Thanks!! |
Have you seen this? |
Attempting to add a Rollup Summary where the same object os on both sides of the relationship doesn't seem to work. For example, the rollup in this screenshot does not update the Parent Account when modifying the Child Account
The text was updated successfully, but these errors were encountered: