diff --git a/entity/Organisation_entity/entityfields/selfduplicatesuncached/children/onlyshowcontactids_param/valueProcess.js b/entity/Organisation_entity/entityfields/selfduplicatesuncached/children/onlyshowcontactids_param/valueProcess.js index 73bdcd3951b566588a5620366af632783b873511..f0d2d9c59045e5f36a3f3d46f51e6ac8dcdcf5ae 100644 --- a/entity/Organisation_entity/entityfields/selfduplicatesuncached/children/onlyshowcontactids_param/valueProcess.js +++ b/entity/Organisation_entity/entityfields/selfduplicatesuncached/children/onlyshowcontactids_param/valueProcess.js @@ -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); + } } } diff --git a/entity/Person_entity/entityfields/selfduplicatesuncached/children/onlyshowcontactids_param/valueProcess.js b/entity/Person_entity/entityfields/selfduplicatesuncached/children/onlyshowcontactids_param/valueProcess.js index 3a0df6ca06d8b7b5c0fc28f10b7b85107b15b3b4..0546ed77c221bc06261d7ddf831affd90e7d3b5c 100644 --- a/entity/Person_entity/entityfields/selfduplicatesuncached/children/onlyshowcontactids_param/valueProcess.js +++ b/entity/Person_entity/entityfields/selfduplicatesuncached/children/onlyshowcontactids_param/valueProcess.js @@ -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); + } } }