From a8486eee4e4f29ad0b65bc0e3467bbb86932cd1d Mon Sep 17 00:00:00 2001 From: "b.ulrich" <b.ulrich@adito.de> Date: Tue, 8 Dec 2020 09:57:55 +0100 Subject: [PATCH] =?UTF-8?q?[Projekt:=20Entwicklung=20-=20xRM][TicketNr.:?= =?UTF-8?q?=201066799][Firma=20-=20Beziehungen=20k=C3=B6nnen=20bei=20einem?= =?UTF-8?q?=20Teil=20der=20Typen=20nicht=20mehr=20bearbeitet=20werden]?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../entityfields/target_context/valueProcess.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/entity/ObjectTree_entity/entityfields/target_context/valueProcess.js b/entity/ObjectTree_entity/entityfields/target_context/valueProcess.js index 700dc7461b..cd4083fad2 100644 --- a/entity/ObjectTree_entity/entityfields/target_context/valueProcess.js +++ b/entity/ObjectTree_entity/entityfields/target_context/valueProcess.js @@ -5,5 +5,9 @@ import("ObjectRelation_lib"); if (vars.get("$sys.recordstate") == neon.OPERATINGSTATE_NEW || vars.get("$sys.recordstate") == neon.OPERATINGSTATE_EDIT) { - result.string(ObjectRelationUtils.getRelationType(vars.get("$field.OBJECTRELATIONTYPEID"))[6]); + var relationType = ObjectRelationUtils.getRelationType(vars.get("$field.OBJECTRELATIONTYPEID")); + if(relationType[3] == "reverse") + result.string(ObjectRelationUtils.getRelationType(vars.get("$field.OBJECTRELATIONTYPEID"))[5]); + else + result.string(ObjectRelationUtils.getRelationType(vars.get("$field.OBJECTRELATIONTYPEID"))[6]); } \ No newline at end of file -- GitLab