Skip to content
Snippets Groups Projects
Commit fe27b044 authored by Johannes Goderbauer's avatar Johannes Goderbauer
Browse files

Merge branch '1064455_FixDuplicateEmployeeContactIdUpdate' into '2020.2.0'

[Projekt: Entwicklung - Neon][TicketNr.: 1064455][Dubletten-Integration bei...

See merge request xrm/basic!383
parents 36f904dc 8f2250bd
No related branches found
No related tags found
No related merge requests found
import("system.tools");
import("Employee_lib");
import("system.vars");
import("system.neon");
......@@ -11,6 +12,12 @@ var mergeSuccess = DuplicateScannerUtils.MergePerson(sourceContactId, targetCont
if(mergeSuccess)
{
var user = tools.getUserByAttribute(tools.CONTACTID, sourceContactId);
if (user) {
user[tools.PARAMS][tools.CONTACTID] = targetContactId;
tools.updateUser(user);
}
var currentContactId = EmployeeUtils.getCurrentContactId();
if(currentContactId == null)
currentContactId = "";
......
import("system.tools");
import("system.db");
import("Employee_lib");
import("KeywordRegistry_basic");
......@@ -15,6 +16,12 @@ var mergeSuccess = DuplicateScannerUtils.MergePerson(sourceContactId, targetCont
if(mergeSuccess)
{
var user = tools.getUserByAttribute(tools.CONTACTID, sourceContactId);
if (user) {
user[tools.PARAMS][tools.CONTACTID] = targetContactId;
tools.updateUser(user);
}
var currentContactId = EmployeeUtils.getCurrentContactId();
if(currentContactId == null)
currentContactId = "";
......
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