Skip to content

Commit 20632c7

Browse files
authored
Merge pull request #339 from matt-hubert/master
Fixed bug with Contact/Lead matching new functionality
2 parents 389f219 + ac979ea commit 20632c7

File tree

2 files changed

+32
-4
lines changed

2 files changed

+32
-4
lines changed

force-app/main/default/classes/SummitEventsContactMatching.cls

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -122,8 +122,12 @@ public with sharing class SummitEventsContactMatching {
122122
if (matchType.get(reg.Event__c) == dr.getDuplicateRule()) {
123123
for (Datacloud.MatchResult mr : dr.getMatchResults()) {
124124
for (Datacloud.MatchRecord mRecord : mr.getMatchRecords()) {
125-
Contact con = (Contact) mRecord.getRecord();
126-
matchContacts.add(con);
125+
try {
126+
Contact con = (Contact) mRecord.getRecord();
127+
matchContacts.add(con);
128+
} catch (Exception e){
129+
System.debug(e);
130+
}
127131
}
128132
}
129133
}
@@ -223,8 +227,12 @@ public with sharing class SummitEventsContactMatching {
223227
if (matchingRule == dr.getDuplicateRule()) {
224228
for (Datacloud.MatchResult mr : dr.getMatchResults()) {
225229
for (Datacloud.MatchRecord mRecord : mr.getMatchRecords()) {
226-
Lead led = (Lead) mRecord.getRecord();
227-
matchLeads.add(led);
230+
try {
231+
Lead led = (Lead) mRecord.getRecord();
232+
matchLeads.add(led);
233+
} catch (Exception e){
234+
System.debug(e);
235+
}
228236
}
229237
}
230238
}

force-app/main/default/objects/Summit_Events__c/fields/Custom_Metadata_Contact_Matching_Method__c.field-meta.xml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,26 @@
1616
<default>false</default>
1717
<label>Admissions</label>
1818
</value>
19+
<value>
20+
<fullName>Blue</fullName>
21+
<default>false</default>
22+
<label>Blue</label>
23+
</value>
24+
<value>
25+
<fullName>Green</fullName>
26+
<default>false</default>
27+
<label>Green</label>
28+
</value>
29+
<value>
30+
<fullName>Red</fullName>
31+
<default>false</default>
32+
<label>Red</label>
33+
</value>
34+
<value>
35+
<fullName>Yellow</fullName>
36+
<default>false</default>
37+
<label>Yellow</label>
38+
</value>
1939
</valueSetDefinition>
2040
</valueSet>
2141
</CustomField>

0 commit comments

Comments
 (0)