Something went wrong on our end
-
David Büchler authored
If a merge has been successful, a new acitivity gets created on the target record of the merge This has been implemented on Person and Organisation
David Büchler authoredIf a merge has been successful, a new acitivity gets created on the target record of the merge This has been implemented on Person and Organisation
onActionProcess.js 761 B
import("Employee_lib");
import("system.vars");
import("system.neon");
import("DuplicateScanner_lib");
let sourceContactId = vars.get("$param.DuplicateCurrentContactId_param");
let targetContactId = 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();
DuplicateScannerUtils.CreateMergeSuccessActivity(sourceContactId, targetContactId, currentContactId, "Organisation");
neon.openContext("Organisation", "OrganisationMain_view", [targetContactId], neon.OPERATINGSTATE_VIEW, null)
}