Skip to content

Commit

Permalink
Adding check for 'Avg' operation (#240)
Browse files Browse the repository at this point in the history
Updated DLRS migration script to play nice with differences in how `AVERAGE` rollup operation is stored between CMDT
  • Loading branch information
melissajhansen authored Jan 26, 2022
1 parent d307f7d commit 0b0fc4d
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions scripts/convert-dlrs-rules.apex
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@ for (dlrs__LookupRollupSummary2__mdt dlrsRule : dlrs__LookupRollupSummary2__mdt.

String operation;
switch on dlrsRule.dlrs__AggregateOperation__c {
when 'Avg' {
operation = 'AVERAGE';
}
when 'Concatenate' {
operation = 'CONCAT';
}
Expand Down

0 comments on commit 0b0fc4d

Please sign in to comment.