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");
import("Employee_lib");
import("KeywordRegistry_basic");
import("ActivityTask_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");
logging.log("targetContactId -> " + targetContactId);
logging.log("sourceContactId -> "+ sourceContactId);
var targetContactId = vars.get("$param.DuplicateCurrentContactId_param");
var sourceContactIdArray = vars.get("$sys.selection");
var sourceContactId = sourceContactIdArray[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");
neon.refreshAll();
// openContext due to the fact, that openContext will lead to an error 'due'cause it's trying to load the already opened preview
// 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,
type[0] = type[0].trim();
var field = AttributeTypeUtil.getDatabaseField(type[0]);
var value = pValueMap[field];
if(value == undefined)
return "";
if (pGetViewValue && type[0] == $AttributeTypes.COMBO)
{
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