Skip to content
Snippets Groups Projects
Commit b4ef5e07 authored by Benjamin Ulrich's avatar Benjamin Ulrich :speech_balloon:
Browse files

[Projekt: Entwicklung - Neon][TicketNr.: 1052262][Firmen und Personen können nicht gelöscht werden]

[Projekt: Entwicklung - Neon][TicketNr.: 1048420][Dublette/ Kontakt: Fehlermeldung bei Integriere ausgewählten in aktuellen Datensatz]
parent 67c72553
No related branches found
No related tags found
No related merge requests found
...@@ -2,24 +2,24 @@ import("system.db"); ...@@ -2,24 +2,24 @@ import("system.db");
import("Employee_lib"); import("Employee_lib");
import("KeywordRegistry_basic"); import("KeywordRegistry_basic");
import("ActivityTask_lib"); import("ActivityTask_lib");
import("system.logging");
import("system.vars"); import("system.vars");
import("system.neon"); import("system.neon");
import("DuplicateScanner_lib"); import("DuplicateScanner_lib");
let targetContactId = vars.get("$param.DuplicateCurrentContactId_param"); var targetContactId = vars.get("$param.DuplicateCurrentContactId_param");
let sourceContactId = vars.get("$sys.selection"); var sourceContactIdArray = vars.get("$sys.selection");
logging.log("targetContactId -> " + targetContactId); var sourceContactId = sourceContactIdArray[0];
logging.log("sourceContactId -> "+ sourceContactId);
//todo the actual merge ought to happen in a separate view where the contact infos can be merged manually by the user. //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) if(mergeSuccess)
{ {
let currentContactId = EmployeeUtils.getCurrentContactId(); var currentContactId = EmployeeUtils.getCurrentContactId();
if(currentContactId == null) if(currentContactId == null)
currentContactId = ""; currentContactId = "";
DuplicateScannerUtils.CreateMergeSuccessActivity(sourceContactId, targetContactId, currentContactId, "Person"); DuplicateScannerUtils.CreateMergeSuccessActivity(sourceContactId, targetContactId, currentContactId, "Person");
// openContext due to the fact, that openContext will lead to an error 'due'cause it's trying to load the already opened preview
neon.refreshAll(); // of the duplicateContact which just got deleted = nullpointException
neon.openContext("Person", null, [targetContactId], neon.OPERATINGSTATE_VIEW, null, null);
} }
\ No newline at end of file
...@@ -468,6 +468,8 @@ AttributeRelationUtils.selectAttributeValue = function (pAttributeId, pValueMap, ...@@ -468,6 +468,8 @@ AttributeRelationUtils.selectAttributeValue = function (pAttributeId, pValueMap,
type[0] = type[0].trim(); type[0] = type[0].trim();
var field = AttributeTypeUtil.getDatabaseField(type[0]); var field = AttributeTypeUtil.getDatabaseField(type[0]);
var value = pValueMap[field]; var value = pValueMap[field];
if(value == undefined)
return "";
if (pGetViewValue && type[0] == $AttributeTypes.COMBO) if (pGetViewValue && type[0] == $AttributeTypes.COMBO)
{ {
value = newSelect("ATTRIBUTE_NAME") value = newSelect("ATTRIBUTE_NAME")
......
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