Skip to content
Snippets Groups Projects
Commit 93f95537 authored by David Büchler's avatar David Büchler
Browse files

If no fields could be found in the pattern (or no pattern exists at all) no...

If no fields could be found in the pattern (or no pattern exists at all) no search for duplicates is excecuted any more in the selfDuplicates consumers in Person and Organisation
parent 55eb9119
No related branches found
No related tags found
No related merge requests found
......@@ -28,19 +28,22 @@ for (fieldname in entityFieldsToLoad)
}
}
let scanResults = DuplicateScannerUtils.ScanForDuplicates(scannerName, targetEntity,
valuesToCheck, null);
let duplicateIds = [];
if(scanResults != undefined && scanResults != null)
if(entityFieldsToLoad != null && entityFieldsToLoad.length > 0)
{
//Run thru every duplicate result and read out the id.
//Do it now to have a simple array on all usages lateron.
for (let i = 0; i < scanResults.length; i++)
let scanResults = DuplicateScannerUtils.ScanForDuplicates(scannerName, targetEntity,
valuesToCheck, null);
if(scanResults != undefined && scanResults != null)
{
let duplicateContactId = scanResults[i][indexsearch.FIELD_ID];
duplicateIds.push(duplicateContactId);
//Run thru every duplicate result and read out the id.
//Do it now to have a simple array on all usages lateron.
for (let i = 0; i < scanResults.length; i++)
{
let duplicateContactId = scanResults[i][indexsearch.FIELD_ID];
duplicateIds.push(duplicateContactId);
}
}
}
......
......@@ -28,19 +28,22 @@ for (fieldname in entityFieldsToLoad)
}
}
let scanResults = DuplicateScannerUtils.ScanForDuplicates(scannerName, targetEntity,
valuesToCheck, null);
let duplicateIds = [];
if(scanResults != undefined && scanResults != null)
if(entityFieldsToLoad != null && entityFieldsToLoad.length > 0)
{
//Run thru every duplicate result and read out the id.
//Do it now to have a simple array on all usages lateron.
for (let i = 0; i < scanResults.length; i++)
let scanResults = DuplicateScannerUtils.ScanForDuplicates(scannerName, targetEntity,
valuesToCheck, null);
if(scanResults != undefined && scanResults != null)
{
let duplicateContactId = scanResults[i][indexsearch.FIELD_ID];
duplicateIds.push(duplicateContactId);
//Run thru every duplicate result and read out the id.
//Do it now to have a simple array on all usages lateron.
for (let i = 0; i < scanResults.length; i++)
{
let duplicateContactId = scanResults[i][indexsearch.FIELD_ID];
duplicateIds.push(duplicateContactId);
}
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment