From 3edb8aa81ac4341d72b3cc8b11af61e86e14044f Mon Sep 17 00:00:00 2001
From: Johannes Goderbauer <j.goderbauer@adito.de>
Date: Wed, 27 May 2020 08:36:00 +0200
Subject: [PATCH] =?UTF-8?q?[Projekt:=20Entwicklung=20-=20Neon][TicketNr.:?=
 =?UTF-8?q?=201057596][Fehler=20bei=20einf=C3=BCgene=20einer=20Verlinkung?=
 =?UTF-8?q?=20(=3DVerkn=C3=BCpfung)=20von=20Kontakten/Firmen=20in=20einem?=
 =?UTF-8?q?=20anderen=20Objekt]?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 entity/Address_entity/afterOperatingState.js | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/entity/Address_entity/afterOperatingState.js b/entity/Address_entity/afterOperatingState.js
index 02ce06265c7..23f607ff7d1 100644
--- a/entity/Address_entity/afterOperatingState.js
+++ b/entity/Address_entity/afterOperatingState.js
@@ -1,3 +1,6 @@
+import("system.vars");
 import("system.neon");
 
-neon.setFieldValue("$field.AddressSearch", "");
\ No newline at end of file
+//in some cases, the field does not exist yet/not anymore when the afterOperatingState process is called
+if (vars.exists("$field.AddressSearch"))
+    neon.setFieldValue("$field.AddressSearch", "");//why is this needed?
\ No newline at end of file
-- 
GitLab