From 6fb371e70a5e9781fa555e8ff71974a344ad3e99 Mon Sep 17 00:00:00 2001
From: "j.luginger" <j.luginger@adito.de>
Date: Tue, 18 May 2021 10:33:50 +0200
Subject: [PATCH] =?UTF-8?q?[Projekt:=20xRM-Sales][TicketNr.:=201081041][Pl?=
 =?UTF-8?q?anung=20bei=20Firma:=20Firmenname=20vorbef=C3=BCllen]?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 entity/Planning_entity/Planning_entity.aod               | 1 +
 .../entityfields/contact_id/valueProcess.js              | 9 +++++++++
 2 files changed, 10 insertions(+)
 create mode 100644 entity/Planning_entity/entityfields/contact_id/valueProcess.js

diff --git a/entity/Planning_entity/Planning_entity.aod b/entity/Planning_entity/Planning_entity.aod
index 3590d75c3b..dec3c63131 100644
--- a/entity/Planning_entity/Planning_entity.aod
+++ b/entity/Planning_entity/Planning_entity.aod
@@ -63,6 +63,7 @@
       <linkedContext>Organisation</linkedContext>
       <mandatory v="true" />
       <stateProcess>%aditoprj%/entity/Planning_entity/entityfields/contact_id/stateProcess.js</stateProcess>
+      <valueProcess>%aditoprj%/entity/Planning_entity/entityfields/contact_id/valueProcess.js</valueProcess>
       <displayValueProcess>%aditoprj%/entity/Planning_entity/entityfields/contact_id/displayValueProcess.js</displayValueProcess>
     </entityField>
     <entityField>
diff --git a/entity/Planning_entity/entityfields/contact_id/valueProcess.js b/entity/Planning_entity/entityfields/contact_id/valueProcess.js
new file mode 100644
index 0000000000..1507222472
--- /dev/null
+++ b/entity/Planning_entity/entityfields/contact_id/valueProcess.js
@@ -0,0 +1,9 @@
+import("system.vars");
+import("system.result");
+
+var contactId = vars.get("$param.ContactId_param");
+
+if(vars.get("$this.value") == null && contactId)
+{
+    result.string(contactId);
+}
\ No newline at end of file
-- 
GitLab