From 082125a58844a7d701ad12139cd95fe4a965b6d1 Mon Sep 17 00:00:00 2001 From: "S.Listl" <S.Listl@SLISTL.aditosoftware.local> Date: Wed, 27 May 2020 15:40:53 +0200 Subject: [PATCH] Faulty activity was created after duplicate merge --- .../integratecurrentintoselectedaction/onActionProcess.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/entity/Person_entity/entityfields/duplicateactions/children/integratecurrentintoselectedaction/onActionProcess.js b/entity/Person_entity/entityfields/duplicateactions/children/integratecurrentintoselectedaction/onActionProcess.js index d9f980358f..648ecdcc39 100644 --- a/entity/Person_entity/entityfields/duplicateactions/children/integratecurrentintoselectedaction/onActionProcess.js +++ b/entity/Person_entity/entityfields/duplicateactions/children/integratecurrentintoselectedaction/onActionProcess.js @@ -3,15 +3,15 @@ import("system.vars"); import("system.neon"); import("DuplicateScanner_lib"); -let sourceContactId = vars.get("$param.DuplicateCurrentContactId_param"); -let targetContactId = vars.get("$sys.selection"); +var sourceContactId = vars.get("$param.DuplicateCurrentContactId_param"); +var targetContactId = vars.get("$sys.selection")[0]; //todo the actual merge ought to happen in a separate view where the contact infos can be merged manually by the user. -let mergeSuccess = DuplicateScannerUtils.MergePerson(sourceContactId, targetContactId); +var mergeSuccess = DuplicateScannerUtils.MergePerson(sourceContactId, targetContactId); if(mergeSuccess) { - let currentContactId = EmployeeUtils.getCurrentContactId(); + var currentContactId = EmployeeUtils.getCurrentContactId(); if(currentContactId == null) currentContactId = ""; DuplicateScannerUtils.CreateMergeSuccessActivity(sourceContactId, targetContactId, currentContactId, "Person"); -- GitLab