Skip to content

Commit

Permalink
bulk import: disabling the by-date/by-amount Opp duplicate check
Browse files Browse the repository at this point in the history
  • Loading branch information
brmeyer committed Jul 26, 2023
1 parent 23a2b6d commit 7d3b0a9
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -103,9 +103,6 @@ public class CrmImportEvent {
public String campaignRecordTypeName;
// TODO: In the future, could add OOTB support for dates, etc. but need to see this play out.

// TODO: Add this to the Portal task. But for now, defaulting it to false out of caution.
public Boolean opportunitySkipDuplicateCheck = false;

public boolean secondPass = false;

public String contactFullName() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1438,14 +1438,6 @@ else if (contactModeRow) {
env.logJobInfo("skipping opp {} import, due to account/contact failure", i + 2);
continue;
}
if (!importEvent.opportunitySkipDuplicateCheck && importEvent.opportunityAmount != null && Strings.isNullOrEmpty(importEvent.opportunityId)) {
List<SObject> existingOpportunities = sfdcClient.searchDonations(nonBatchAccountIds.get(i), nonBatchContactIds.get(i),
importEvent.opportunityDate, importEvent.opportunityAmount.doubleValue(), opportunityCustomFields);
if (!existingOpportunities.isEmpty()) {
env.logJobInfo("skipping opp {} import, due to possible duplicate: {}", i + 2, existingOpportunities.get(0).getId());
continue;
}
}

setBulkImportOpportunityFields(opportunity, null, importEvent);

Expand Down

0 comments on commit 7d3b0a9

Please sign in to comment.