Releases: jamessimone/apex-rollup
Releases · jamessimone/apex-rollup
Query Related LOC reduction
- minor version bump for query-related LOC reduction
- ensure cached entities for CMDT field definitions are updated when object changes
Support for CDC & Custom Fields in Rollup CMDT
- Fixes #6 by adding support for Change Data Capture
- Fixed bug with
TriggerOperation
not always being consistently set - Fixes bug with use of custom fields as any of the four lookup fields in
Rollup__mdt
- Updated Readme in various areas, including how to avoid chunking errors for 6+ rollup operations in the "Manual Apex" section, and how to implement with CDC
- Finished raising method/class visibility to global so that it can be referenced inside of managed packages
Last of initial launch feedback - stable
- Correctly initialize the "default" (database-version) instance of each calculation item passed in from an Invocable. (Fixes issue where if an item wasn't pre-existing, it would not get added to the comparison Map)
- Fixed bug with MIN/MAX where too many items were pulled into the query performed when a recalculation was needed
- Brought CONCAT_DISTINCT into alignment with actual expected behavior for Strings
Chain of Responsibility / Further flow improvements
- Fixed the test associated with a previously fixed bug to actually prove the bug had been fixed - previously, if records fed into the Invocable action included formula fields with null values,
Rollup
would try to initialize the potentially pre-existing DB version of that record by writing to that formula field on the chance they were involved in the rollup calculation. Now, in addition to only re-querying for fields specific to the rollup operation, we also ensure if the field is null on the DB version of the record, it is only written to if the field is writeable. - Removed the duplicate switch statements in
StringRollupCalculator
/DecimalRollupCalculator
. In addition to making the indenting hellish, it was also slower. Used Chain of Responsibility at the parent class level to make it easy for eachRollupCalculator
to opt into actual behavior for rollup operations, which also sped things up.
Invocable and CMDT-based overrides
- Fixed invocable logic - no longer assumes all passed in records are of the same SObjectType / set of fields
- Added overrides to both CMDT and Invocable that allow for default values to be set for number-based and string-based rollup fields (including Datetime, Date, and Time-based fields)
- Added tests to ensure that override were working both from CMDT and invocable-based routes
- Added support for "UPSERT" being supplied as a rollup context for invocable action