You need to sign in to do that
Don't have an account?

findDuplicates "The list of results isn't the same size as the input list"
Hi,
I receive this error " The list of results isn't the same size as the input list" when I run this class:
thanks in advance
I receive this error " The list of results isn't the same size as the input list" when I run this class:
public static void findDuplicates() { Lead ld = new Lead(LastName='aaa', MobilePhone='11', Phone='11', Email='aaa@aaa.it', LeadSource='Passaparola'); Lead ld1 = new Lead(LastName='aaa', MobilePhone='111', Phone='111', Email='aaa@aaa.it', LeadSource='Passaparola'); List<Lead> leadList = new List<Lead>(); leadList.add(ld); leadList.add(ld1); Datacloud.FindDuplicatesResult[] results = Datacloud.FindDuplicates.findDuplicates(leadList); for (Datacloud.FindDuplicatesResult findDupeResult : results) { for (Datacloud.DuplicateResult dupeResult : findDupeResult.getDuplicateResults()) { for (Datacloud.MatchResult matchResult : dupeResult.getMatchResults()) { for (Datacloud.MatchRecord matchRecord : matchResult.getMatchRecords()) { System.debug('Duplicate Record: ' + matchRecord.getRecord()); } } } }Any Ideas?
thanks in advance