-
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
Support for rollups on Account when doing Merge Account #303
Comments
Update: I have reproduced this in an Apex Unit test and am looking at a way to resolve. |
Just curious if there has been any progress on this - we're running into issues with several fields being out of date due to merges. |
Nothing as yet sorry @jongpie. It is marked as a priority enhancement, so when i or another contributor gets a burst of time it will get seen ahead of others. |
Ok started to explore this... its not going to be possible to get this to work realtime...
Going to try this with Schedule Mode rollups... |
Ok, i think i have found a solution that allows the rollup to remain realtime most of the time, and switch dynamically to schedule mode in a merge scenario. This will require the RollupJob class to be scheduled, even if you don't have any Scheduled rollups. |
Added in v2.4.1. |
@ChristiHarris can you please open a new issue and fill in the steps to reproduce etc. I am not quite sure from the above what it is you are saying is related to this issue and I think its best to start afresh. Thank you! 👍 |
As per discussion on Chatter....
"I was testing this out by counting attachments on accounts which worked well. My question is if there is a way to trigger a recalculation upon merge? I have a lot of accounts that get merged daily, but the count didn't update after I did a test merge."
"HI @ben Patterson (Pentair Aquatic Systems) I seem to recall a help document that says that merge operations don't fire triggers. Here is the article: https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_triggers_merge_statements.htm. It seems that a before delete or after delete action would fire the trigger, but I'm not sure how @andrew Fawcett (FinancialForce.com) has the triggers set up in Declarative Lookup Rollup Summaries Tool (e.g., can the tool capture a before delete action)."
"Hmm, it says no triggers for the related records are fired. That being said, we might be stuck."
"Thanks @[Kent Manning] yeah was just reading that as well, i think though this applies in the context of DLRS to the Parent object, where there is not a Apex Trigger deployed, thats only on the child. I'd need to do some testing to see whats going on here, as reparenting child records should work, i'm wondering if Salesforce is not firing the Apex Trigger on the child in this case of merge, i have some vague recollection this might be the case. Thats not to say we are dead in the water here, i'm up for considering updating the tool to deploy a trigger on the parent to support merge."
The text was updated successfully, but these errors were encountered: