Something went wrong on our end
-
David Büchler authored
Created Fallback on creation of an merge activity, if there is no current contact id, an empty string gets used
David Büchler authoredCreated Fallback on creation of an merge activity, if there is no current contact id, an empty string gets used
onActionProcess.js 761 B
import("Employee_lib");
import("system.logging");
import("system.vars");
import("system.neon");
import("DuplicateScanner_lib");
let targetContactId = vars.get("$param.DuplicateCurrentContactId_param");
let sourceContactId = vars.get("$sys.selection");
//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.MergeOrganisation(sourceContactId, targetContactId);
if(mergeSuccess)
{
let currentContactId = EmployeeUtils.getCurrentContactId();
if(currentContactId == null)
currentContactId = "";
DuplicateScannerUtils.CreateMergeSuccessActivity(sourceContactId, targetContactId, currentContactId, "Organisation");
neon.refreshAll();
}