Skip to content
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

odd behavior using parent and empty collections #619

Closed
sweinrarw opened this issue Aug 30, 2024 · 3 comments · Fixed by #628
Closed

odd behavior using parent and empty collections #619

sweinrarw opened this issue Aug 30, 2024 · 3 comments · Fixed by #628

Comments

@sweinrarw
Copy link

seems like this is happening in cmdt and flow based rollups noticed it on 1.6.32 and see the same thing on 1.6.33
one of my production orgs is on 1.6.29 and does not experience this. Note this is rolling up tasks so the cmdt uses the newer text fields to define the child object/field

in the flow based recalc I have the context is set to REFRESH
parent record id is included and no "records to rollup" passed

There are two rollup nodes in the flow. one to count "open" records with a filter and one to count all with no filter.
I can see the RollupFullBatchRecalculator job run. once its finished there is no actual change to the parent record(last modified stays at the last time it was edited) and the calc field does not change
Ive tried using deferred and processing them both together with the same result
also tried only running one of them at a time and saw the same thing

@jamessimone
Copy link
Owner

I'm not sure that I ever intended to support not passing records to rollup in flow - my guess is that #610 accidentally "fixed" this by including some default values that weren't previously being passed by the CMDT-based action to the core rollup engine by taking advantage of this release update. That being said, there's little obvious value in those changes so I'm open to removing them if it helps alleviate this issue for you. I will take a look at this next week.

@sweinrarw
Copy link
Author

Ahh gotcha, I may have misunderstood you on #568 earlier this year. The way I understood it was if the parent id is included in the invocable action for a refresh, the records to rollup should be left blank.
I tried using the cmdt based action while passing the records in and got heap size too large error (its a 10k+ list of records), also tried the cmdt flow action with parent id set and no records passed but it doesn't kick off the batch job or update anything.
This is mainly used by one of my data analysts on a per record(parent) basis when he has to do manual imports (where the child records dont trigger the normal rollup). I have him do it through a flow so we can stamp a "last full recalc date" on the parent record to prevent it from being re-run multiple times. I'm open to suggestions if there is a better way to go about it. I had also tried the record-based LWC you have to recalculate but it doesn't look like its working either

@jamessimone
Copy link
Owner

Ah no, I don't think you're misremembering - it's me that had forgotten that crucial detail. Thanks for refreshing my memory. Based on it working before 1.6.30 though, I still suspect this to be an unintentional side effect of those new default value additions for Flow. Let me take a look and get back to you!

jamessimone added a commit that referenced this issue Sep 5, 2024
jamessimone added a commit that referenced this issue Sep 26, 2024
* Removes GAP_CREATE and GAP_UPDATE from CDC handling as those are not valid CDC cases for rolling up

* Fixes an issue with the Rollup_Field_Parent_Required validation rule on Rollup__mdt

* Fixes #619 by more carefully handling parentRecordIdForEmptyChildrenCollections variable

* Updates jsconfig.json with new CLI-based changes

* Removes heap size checks as they are unncessarily expensive when checking rollup limits

* Fixes #626 by patching a few places where RollupControl__mdt being null (which is sometimes set internally by the framework for performance reasons) does not cause issues when trying to log

* Fixes #623 by properly parsing nested IN conditions during recursive where clause operations

* Fixes #622 by properly tracking changes to calc items when updates occur with differing values for multicurrency orgs

* Fixes an issue where sync rollups enqueued by Flow would not run in the proper order

* Attempted fix for #625 - do not allow max query rows to exceed the platform limit


* Fixes an issue reported by Katherine West where multiple order bys were sometimes omitted in RollupRepository queries due to an inner ordering - moved the ordering to in-memory sorting
jamessimone added a commit that referenced this issue Oct 14, 2024
jamessimone added a commit that referenced this issue Oct 17, 2024
jamessimone added a commit that referenced this issue Nov 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants