Skip to content

Commit

Permalink
Fixed ticket 1007
Browse files Browse the repository at this point in the history
  • Loading branch information
chininchu authored and aheber committed Oct 8, 2024
1 parent 41e5aa2 commit 66910f7
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions dlrs/main/classes/RollupService.cls
Original file line number Diff line number Diff line change
Expand Up @@ -1670,13 +1670,10 @@ global with sharing class RollupService {
// Run as current user to enforce sharing rules
dml.DuplicateRuleHeader.runAsCurrentUser = true;

// Apply DmlOptions to each record
for (SObject record : masterRecords) {
record.setOptions(dml);
}
dml.OptAllOrNone = allOrNothing;

try {
return Database.update(masterRecords, allOrNothing);
return Database.update(masterRecords, dml);
} catch (DMLException e) {
// Determine if the exception is due to parent record/s having been deleted
Boolean throwException = true;
Expand All @@ -1699,6 +1696,7 @@ global with sharing class RollupService {
return new List<Database.Saveresult>();
}
// Throw on as normal

throw e;
}
}
Expand Down

0 comments on commit 66910f7

Please sign in to comment.