Skip to content

Commit f311cae

Browse files
committed
Fixes #82 - with caveats about the need to extend the LWC to support all of the fields necessary - by enforcing validation rules for performFullRecalculation method in Rollup
1 parent 5689bf8 commit f311cae

File tree

3 files changed

+10
-3
lines changed

3 files changed

+10
-3
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,12 @@ Create fast, scalable custom rollups driven by Custom Metadata in your Salesforc
99

1010
### Package deployment options
1111

12-
<a href="https://login.salesforce.com/packaging/installPackage.apexp?p0=04t6g000008GJRnAAO">
12+
<a href="https://login.salesforce.com/packaging/installPackage.apexp?p0=04t6g000008GJSbAAO">
1313
<img alt="Deploy to Salesforce"
1414
src="./media/deploy-package-to-prod.png">
1515
</a>
1616

17-
<a href="https://test.salesforce.com/packaging/installPackage.apexp?p0=04t6g000008GJRnAAO">
17+
<a href="https://test.salesforce.com/packaging/installPackage.apexp?p0=04t6g000008GJSbAAO">
1818
<img alt="Deploy to Salesforce"
1919
src="./media/deploy-package-to-sandbox.png">
2020
</a>

rollup/core/classes/Rollup.cls

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -444,6 +444,12 @@ global without sharing virtual class Rollup implements Database.Batchable<SObjec
444444
String potentialWhereClause,
445445
String potentialConcatDelimiter
446446
) {
447+
// TODO - need to be able to supply fullRecalculationDefaultStringValue, fullRecalculationDefaultNumberValue, and orderByFirstLast
448+
FlowInput validationRuleWrapper = new FlowInput();
449+
validationRuleWrapper.rollupOperation = operationName.toUpperCase();
450+
validationRuleWrapper.concatDelimiter = potentialConcatDelimiter;
451+
enforceValidationRules(validationRuleWrapper);
452+
447453
QueryWrapper wrapper = new QueryWrapper(lookupSObjectName, lookupFieldOnLookupObject);
448454
wrapper.setQuery(potentialWhereClause);
449455
return performFullRecalculationInner(

sfdx-project.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
"[email protected]": "04t6g000008GJNqAAO",
1919
"[email protected]": "04t6g000008GJNvAAO",
2020
"[email protected]": "04t6g000008GJQVAA4",
21-
"[email protected]": "04t6g000008GJRnAAO"
21+
"[email protected]": "04t6g000008GJRnAAO",
22+
"[email protected]": "04t6g000008GJSbAAO"
2223
}
2324
}

0 commit comments

Comments
 (0)