From 2929cbca74d519251e6f05bb8ac04b74319ca89f Mon Sep 17 00:00:00 2001
From: Johannes Hoermann <j.hoermann@adito.de>
Date: Tue, 19 Mar 2019 13:12:44 +0100
Subject: [PATCH] Merge master

---
 .../ActivityLink_entity.aod                   |  2 +-
 .../children/objecttype_param/valueProcess.js |  3 +-
 entity/Activity_entity/Activity_entity.aod    | 12 ------
 .../containername_param/valueProcess.js       |  5 +++
 .../children/contextname/valueProcess.js      |  3 ++
 .../contextname_param/valueProcess.js         |  3 +-
 .../moduletrees/children/id/valueProcess.js   |  4 ++
 .../contacttype_param/valueProcess.js         |  3 ++
 .../contacttype_param/valueProcess.js         |  3 ++
 .../children/contactid_param/valueProcess.js  |  4 ++
 .../children/contactid_param/valueProcess.js  |  4 ++
 .../AppointmentLink_entity.aod                |  2 +-
 .../appointmentid_param/valueProcess.js       |  6 +++
 .../children/contextid_param/valueProcess.js  |  0
 .../children/objecttype_param/valueProcess.js |  0
 .../containername_param/valueProcess.js       |  9 ++++
 .../AttributeUsage_entity.aod                 |  2 +-
 .../containername_param/valueProcess.js       |  5 +++
 entity/Context_entity/Context_entity.aod      | 41 ++++++-------------
 .../contextid_param/documentation.adoc        |  1 -
 .../recordcontainers/jdito/contentProcess.js  |  9 +---
 .../ModuleTree_entity/ModuleTree_entity.aod   | 10 +++++
 .../containername_param/valueProcess.js       |  3 ++
 .../providertype_param/valueProcess.js        |  3 ++
 entity/Object_entity/Object_entity.aod        |  9 ++--
 .../recordcontainers/jdito/contentProcess.js  |  4 +-
 .../containername_param/valueProcess.js       |  5 +++
 .../objectrowid_param/valueProcess.js         |  4 ++
 .../children/orgid_param/valueProcess.js      |  4 ++
 .../containername_param/valueProcess.js       |  5 +++
 .../containername_param/valueProcess.js       |  5 +++
 .../containername_param/valueProcess.js       |  5 +++
 .../children/productid_param/valueProcess.js  |  4 ++
 .../children/productid_param/valueProcess.js  |  4 ++
 .../SalesprojectCompetition_entity.aod        |  1 -
 .../containername_param/valueProcess.js       |  5 +++
 .../containername_param/valueProcess.js       |  5 +++
 .../containername_param/valueProcess.js       |  5 +++
 .../containername_param/valueProcess.js       |  5 +++
 .../containername_param/valueProcess.js       |  6 +++
 .../entityfields/reason/onValidation.js       | 11 -----
 .../Salesproject_entity.aod                   |  1 -
 .../containername_param/valueProcess.js       |  5 +++
 .../containername_param/valueProcess.js       |  5 +++
 .../entityfields/reasons/mandatoryProcess.js  |  5 ++-
 .../reasons/possibleItemsProcess.js           |  9 ----
 .../entityfields/reasons/valueProcess.js      | 12 ++++--
 .../containername_param/valueProcess.js       |  5 +++
 .../children/contextname/valueProcess.js      |  3 ++
 .../contextname_param/valueProcess.js         |  3 +-
 .../moduletrees/children/id/valueProcess.js   |  4 ++
 51 files changed, 188 insertions(+), 88 deletions(-)
 create mode 100644 entity/Activity_entity/entityfields/keywordcategory/children/containername_param/valueProcess.js
 create mode 100644 entity/Activity_entity/entityfields/moduletrees/children/contextname/valueProcess.js
 create mode 100644 entity/Activity_entity/entityfields/moduletrees/children/id/valueProcess.js
 create mode 100644 entity/Address_entity/entityfields/organisationaddresses/children/contacttype_param/valueProcess.js
 create mode 100644 entity/Address_entity/entityfields/organisationaddressesbycontact/children/contacttype_param/valueProcess.js
 create mode 100644 entity/AnyContact_entity/entityfields/contact/children/contactid_param/valueProcess.js
 create mode 100644 entity/AnyContact_entity/entityfields/organisation/children/contactid_param/valueProcess.js
 create mode 100644 entity/Appointment_entity/entityfields/appointmentlinks/children/appointmentid_param/valueProcess.js
 create mode 100644 entity/Appointment_entity/entityfields/contexts/children/contextid_param/valueProcess.js
 create mode 100644 entity/Appointment_entity/entityfields/objects/children/objecttype_param/valueProcess.js
 create mode 100644 entity/AttributeRelation_entity/entityfields/keyword/children/containername_param/valueProcess.js
 create mode 100644 entity/Attribute_entity/entityfields/keywordattributetype/children/containername_param/valueProcess.js
 delete mode 100644 entity/Context_entity/entityfields/contextid_param/documentation.adoc
 create mode 100644 entity/ObjectRelation_entity/entityfields/keywordobjectrelationtype/children/containername_param/valueProcess.js
 create mode 100644 entity/ObjectRelation_entity/entityfields/objectrelations/children/providertype_param/valueProcess.js
 create mode 100644 entity/Offer_entity/entityfields/keywordprobability/children/containername_param/valueProcess.js
 create mode 100644 entity/Organisation_entity/entityfields/attributes/children/objectrowid_param/valueProcess.js
 create mode 100644 entity/Organisation_entity/entityfields/contacts/children/orgid_param/valueProcess.js
 create mode 100644 entity/Organisation_entity/entityfields/keywordprice_politics/children/containername_param/valueProcess.js
 create mode 100644 entity/Organisation_entity/entityfields/keywordstrenght/children/containername_param/valueProcess.js
 create mode 100644 entity/Organisation_entity/entityfields/keywordweakness/children/containername_param/valueProcess.js
 create mode 100644 entity/Product_entity/entityfields/stock/children/productid_param/valueProcess.js
 create mode 100644 entity/Product_entity/entityfields/stockcount/children/productid_param/valueProcess.js
 create mode 100644 entity/SalesprojectCompetition_entity/entityfields/keywordphase/children/containername_param/valueProcess.js
 create mode 100644 entity/SalesprojectCompetition_entity/entityfields/keywordprice_politics/children/containername_param/valueProcess.js
 create mode 100644 entity/SalesprojectCompetition_entity/entityfields/keywordstate/children/containername_param/valueProcess.js
 create mode 100644 entity/SalesprojectCompetition_entity/entityfields/keywordstrenght/children/containername_param/valueProcess.js
 create mode 100644 entity/SalesprojectCompetition_entity/entityfields/keywordweakness/children/containername_param/valueProcess.js
 delete mode 100644 entity/SalesprojectCompetition_entity/entityfields/reason/onValidation.js
 create mode 100644 entity/Salesproject_entity/entityfields/keywordphase/children/containername_param/valueProcess.js
 create mode 100644 entity/Salesproject_entity/entityfields/keywordstate/children/containername_param/valueProcess.js
 delete mode 100644 entity/Salesproject_entity/entityfields/reasons/possibleItemsProcess.js
 create mode 100644 entity/Task_entity/entityfields/keywordpriority/children/containername_param/valueProcess.js
 create mode 100644 entity/Task_entity/entityfields/moduletrees/children/contextname/valueProcess.js
 create mode 100644 entity/Task_entity/entityfields/moduletrees/children/id/valueProcess.js

diff --git a/entity/ActivityLink_entity/ActivityLink_entity.aod b/entity/ActivityLink_entity/ActivityLink_entity.aod
index 4a85b1615e..34b9c2ad50 100644
--- a/entity/ActivityLink_entity/ActivityLink_entity.aod
+++ b/entity/ActivityLink_entity/ActivityLink_entity.aod
@@ -16,7 +16,6 @@
       <name>OBJECT_TYPE</name>
       <title>Object type</title>
       <consumer>Context</consumer>
-      <linkedContext>Context</linkedContext>
       <displayValueProcess>%aditoprj%/entity/ActivityLink_entity/entityfields/object_type/displayValueProcess.js</displayValueProcess>
     </entityField>
     <entityField>
@@ -63,6 +62,7 @@
         <entityParameter>
           <name>ObjectType_param</name>
           <valueProcess>%aditoprj%/entity/ActivityLink_entity/entityfields/objects/children/objecttype_param/valueProcess.js</valueProcess>
+          <expose v="true" />
           <triggerRecalculation v="true" />
         </entityParameter>
       </children>
diff --git a/entity/ActivityLink_entity/entityfields/objects/children/objecttype_param/valueProcess.js b/entity/ActivityLink_entity/entityfields/objects/children/objecttype_param/valueProcess.js
index b1bb16711d..e7fef06da0 100644
--- a/entity/ActivityLink_entity/entityfields/objects/children/objecttype_param/valueProcess.js
+++ b/entity/ActivityLink_entity/entityfields/objects/children/objecttype_param/valueProcess.js
@@ -1,4 +1,5 @@
+import("system.logging");
 import("system.result");
 import("system.vars");
-
+logging.log("set " + vars.get("$field.OBJECT_TYPE"))
 result.string(vars.get("$field.OBJECT_TYPE"));
\ No newline at end of file
diff --git a/entity/Activity_entity/Activity_entity.aod b/entity/Activity_entity/Activity_entity.aod
index 55bd00c9c3..1e7a0db0e3 100644
--- a/entity/Activity_entity/Activity_entity.aod
+++ b/entity/Activity_entity/Activity_entity.aod
@@ -148,11 +148,6 @@
         <element>PROCESS</element>
       </onValueChangeTypes>
     </entityField>
-    <entityParameter>
-      <name>ActivityId_param</name>
-      <mandatory v="false" />
-      <description>PARAMETER</description>
-    </entityParameter>
     <entityConsumer>
       <name>Links</name>
       <title>Connections</title>
@@ -166,7 +161,6 @@
         <entityParameter>
           <name>ActivityId_param</name>
           <valueProcess>%aditoprj%/entity/Activity_entity/entityfields/links/children/activityid_param/valueProcess.js</valueProcess>
-          <expose v="true" />
         </entityParameter>
       </children>
     </entityConsumer>
@@ -236,10 +230,6 @@
         </entityDependency>
       </dependencies>
       <children>
-        <entityParameter>
-          <name>ActivityId_param</name>
-          <expose v="false" />
-        </entityParameter>
         <entityParameter>
           <name>OnlyInnate_param</name>
           <expose v="false" />
@@ -276,8 +266,6 @@
         <entityParameter>
           <name>ContextName_param</name>
           <valueProcess>%aditoprj%/entity/Activity_entity/entityfields/moduletrees/children/contextname_param/valueProcess.js</valueProcess>
-          <expose v="false" />
-          <mandatory v="false" />
         </entityParameter>
         <entityParameter>
           <name>ID_param</name>
diff --git a/entity/Activity_entity/entityfields/keywordcategory/children/containername_param/valueProcess.js b/entity/Activity_entity/entityfields/keywordcategory/children/containername_param/valueProcess.js
new file mode 100644
index 0000000000..7b43ff2f6b
--- /dev/null
+++ b/entity/Activity_entity/entityfields/keywordcategory/children/containername_param/valueProcess.js
@@ -0,0 +1,5 @@
+import("system.result");
+import("Keyword_lib");
+import("KeywordRegistry_basic");
+
+result.string($KeywordRegistry.activityCategory());
\ No newline at end of file
diff --git a/entity/Activity_entity/entityfields/moduletrees/children/contextname/valueProcess.js b/entity/Activity_entity/entityfields/moduletrees/children/contextname/valueProcess.js
new file mode 100644
index 0000000000..109d9bf5c8
--- /dev/null
+++ b/entity/Activity_entity/entityfields/moduletrees/children/contextname/valueProcess.js
@@ -0,0 +1,3 @@
+import("system.result");
+
+result.string("Activity");
\ No newline at end of file
diff --git a/entity/Activity_entity/entityfields/moduletrees/children/contextname_param/valueProcess.js b/entity/Activity_entity/entityfields/moduletrees/children/contextname_param/valueProcess.js
index 109d9bf5c8..6f0153b04f 100644
--- a/entity/Activity_entity/entityfields/moduletrees/children/contextname_param/valueProcess.js
+++ b/entity/Activity_entity/entityfields/moduletrees/children/contextname_param/valueProcess.js
@@ -1,3 +1,4 @@
 import("system.result");
+import("Context_lib")
 
-result.string("Activity");
\ No newline at end of file
+result.string(ContextUtils.getCurrentContextId());
\ No newline at end of file
diff --git a/entity/Activity_entity/entityfields/moduletrees/children/id/valueProcess.js b/entity/Activity_entity/entityfields/moduletrees/children/id/valueProcess.js
new file mode 100644
index 0000000000..06fe7d3632
--- /dev/null
+++ b/entity/Activity_entity/entityfields/moduletrees/children/id/valueProcess.js
@@ -0,0 +1,4 @@
+import("system.result");
+import("system.vars");
+
+result.string(vars.get("$field.ACTIVITYID"));
\ No newline at end of file
diff --git a/entity/Address_entity/entityfields/organisationaddresses/children/contacttype_param/valueProcess.js b/entity/Address_entity/entityfields/organisationaddresses/children/contacttype_param/valueProcess.js
new file mode 100644
index 0000000000..85a095aeb8
--- /dev/null
+++ b/entity/Address_entity/entityfields/organisationaddresses/children/contacttype_param/valueProcess.js
@@ -0,0 +1,3 @@
+import("system.result");
+
+result.object(1);
\ No newline at end of file
diff --git a/entity/Address_entity/entityfields/organisationaddressesbycontact/children/contacttype_param/valueProcess.js b/entity/Address_entity/entityfields/organisationaddressesbycontact/children/contacttype_param/valueProcess.js
new file mode 100644
index 0000000000..85a095aeb8
--- /dev/null
+++ b/entity/Address_entity/entityfields/organisationaddressesbycontact/children/contacttype_param/valueProcess.js
@@ -0,0 +1,3 @@
+import("system.result");
+
+result.object(1);
\ No newline at end of file
diff --git a/entity/AnyContact_entity/entityfields/contact/children/contactid_param/valueProcess.js b/entity/AnyContact_entity/entityfields/contact/children/contactid_param/valueProcess.js
new file mode 100644
index 0000000000..7b6137b4d1
--- /dev/null
+++ b/entity/AnyContact_entity/entityfields/contact/children/contactid_param/valueProcess.js
@@ -0,0 +1,4 @@
+import("system.vars");
+import("system.result");
+
+result.string(vars.get("$field.CONTACTID"));
\ No newline at end of file
diff --git a/entity/AnyContact_entity/entityfields/organisation/children/contactid_param/valueProcess.js b/entity/AnyContact_entity/entityfields/organisation/children/contactid_param/valueProcess.js
new file mode 100644
index 0000000000..7b6137b4d1
--- /dev/null
+++ b/entity/AnyContact_entity/entityfields/organisation/children/contactid_param/valueProcess.js
@@ -0,0 +1,4 @@
+import("system.vars");
+import("system.result");
+
+result.string(vars.get("$field.CONTACTID"));
\ No newline at end of file
diff --git a/entity/AppointmentLink_entity/AppointmentLink_entity.aod b/entity/AppointmentLink_entity/AppointmentLink_entity.aod
index 8e737b0ef5..732749a4a9 100644
--- a/entity/AppointmentLink_entity/AppointmentLink_entity.aod
+++ b/entity/AppointmentLink_entity/AppointmentLink_entity.aod
@@ -60,7 +60,7 @@
       <dependency>
         <name>dependency</name>
         <entityName>Context_entity</entityName>
-        <fieldName>Context</fieldName>
+        <fieldName>#PROVIDER</fieldName>
       </dependency>
     </entityConsumer>
     <entityConsumer>
diff --git a/entity/Appointment_entity/entityfields/appointmentlinks/children/appointmentid_param/valueProcess.js b/entity/Appointment_entity/entityfields/appointmentlinks/children/appointmentid_param/valueProcess.js
new file mode 100644
index 0000000000..4caaf94026
--- /dev/null
+++ b/entity/Appointment_entity/entityfields/appointmentlinks/children/appointmentid_param/valueProcess.js
@@ -0,0 +1,6 @@
+import("system.logging");
+import("system.result");
+import("system.vars");
+
+logging.log("SET: -" + vars.get("$field.UID") + "-")
+result.string(vars.get("$field.UID"));
\ No newline at end of file
diff --git a/entity/Appointment_entity/entityfields/contexts/children/contextid_param/valueProcess.js b/entity/Appointment_entity/entityfields/contexts/children/contextid_param/valueProcess.js
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/entity/Appointment_entity/entityfields/objects/children/objecttype_param/valueProcess.js b/entity/Appointment_entity/entityfields/objects/children/objecttype_param/valueProcess.js
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/entity/AttributeRelation_entity/entityfields/keyword/children/containername_param/valueProcess.js b/entity/AttributeRelation_entity/entityfields/keyword/children/containername_param/valueProcess.js
new file mode 100644
index 0000000000..6c3a508f22
--- /dev/null
+++ b/entity/AttributeRelation_entity/entityfields/keyword/children/containername_param/valueProcess.js
@@ -0,0 +1,9 @@
+import("system.db");
+import("system.result");
+import("Sql_lib")
+
+var attrKeywordSelect = "select KEYWORD_CONTAINER from AB_ATTRIBUTE";
+attrKeywordSelect = SqlCondition.begin()
+    .andPrepareVars("AB_ATTRIBUTE.AB_ATTRIBUTEID", "$field.AB_ATTRIBUTE_ID")
+    .buildSql(attrKeywordSelect);
+result.string(db.cell(attrKeywordSelect));
\ No newline at end of file
diff --git a/entity/AttributeUsage_entity/AttributeUsage_entity.aod b/entity/AttributeUsage_entity/AttributeUsage_entity.aod
index 5ad130a9ff..18af22e834 100644
--- a/entity/AttributeUsage_entity/AttributeUsage_entity.aod
+++ b/entity/AttributeUsage_entity/AttributeUsage_entity.aod
@@ -62,7 +62,7 @@
       <dependency>
         <name>dependency</name>
         <entityName>Context_entity</entityName>
-        <fieldName>Context</fieldName>
+        <fieldName>#PROVIDER</fieldName>
       </dependency>
     </entityConsumer>
   </entityFields>
diff --git a/entity/Attribute_entity/entityfields/keywordattributetype/children/containername_param/valueProcess.js b/entity/Attribute_entity/entityfields/keywordattributetype/children/containername_param/valueProcess.js
new file mode 100644
index 0000000000..dc6dfca332
--- /dev/null
+++ b/entity/Attribute_entity/entityfields/keywordattributetype/children/containername_param/valueProcess.js
@@ -0,0 +1,5 @@
+import("system.result");
+import("Keyword_lib");
+import("KeywordRegistry_basic");
+
+result.string($KeywordRegistry.attributeType());
\ No newline at end of file
diff --git a/entity/Context_entity/Context_entity.aod b/entity/Context_entity/Context_entity.aod
index 87d0b1a020..922b46b44d 100644
--- a/entity/Context_entity/Context_entity.aod
+++ b/entity/Context_entity/Context_entity.aod
@@ -28,6 +28,18 @@
           <fieldName>Contexts</fieldName>
           <isConsumer v="false" />
         </entityDependency>
+        <entityDependency>
+          <name>37559258-24f1-4c8c-b462-23ddf8de4e1e</name>
+          <entityName>AppointmentLink_entity</entityName>
+          <fieldName>Context</fieldName>
+          <isConsumer v="false" />
+        </entityDependency>
+        <entityDependency>
+          <name>f1eebe8c-93d2-4977-b619-b6315f843f7a</name>
+          <entityName>AttributeUsage_entity</entityName>
+          <fieldName>Context</fieldName>
+          <isConsumer v="false" />
+        </entityDependency>
       </dependencies>
     </entityProvider>
     <entityField>
@@ -38,38 +50,9 @@
       <name>CONTEXT_NAME</name>
       <title>Context name</title>
     </entityField>
-    <entityParameter>
-      <name>ContextId_param</name>
-      <expose v="true" />
-      <mandatory v="false" />
-      <documentation>%aditoprj%/entity/Context_entity/entityfields/contextid_param/documentation.adoc</documentation>
-      <description>PARAMETER</description>
-    </entityParameter>
     <entityProvider>
       <name>Context</name>
       <fieldType>DEPENDENCY_IN</fieldType>
-      <dependencies>
-        <entityDependency>
-          <name>628bd4db-3b31-4337-88ac-1c000307836f</name>
-          <entityName>AttributeUsage_entity</entityName>
-          <fieldName>Context</fieldName>
-          <isConsumer v="false" />
-        </entityDependency>
-        <entityDependency>
-          <name>64f5aca8-e756-4a6d-a7a3-89bdc67ddfb3</name>
-          <entityName>AppointmentLink_entity</entityName>
-          <fieldName>Context</fieldName>
-          <isConsumer v="false" />
-        </entityDependency>
-      </dependencies>
-      <children>
-        <entityParameter>
-          <name>ContextId_param</name>
-          <expose v="true" />
-          <triggerRecalculation v="true" />
-          <mandatory v="true" />
-        </entityParameter>
-      </children>
     </entityProvider>
   </entityFields>
   <recordContainers>
diff --git a/entity/Context_entity/entityfields/contextid_param/documentation.adoc b/entity/Context_entity/entityfields/contextid_param/documentation.adoc
deleted file mode 100644
index abbd33cd24..0000000000
--- a/entity/Context_entity/entityfields/contextid_param/documentation.adoc
+++ /dev/null
@@ -1 +0,0 @@
-If you provide the ContextId_param only this context is provided.
\ No newline at end of file
diff --git a/entity/Context_entity/recordcontainers/jdito/contentProcess.js b/entity/Context_entity/recordcontainers/jdito/contentProcess.js
index 07c0d727b9..9ecbf1f708 100644
--- a/entity/Context_entity/recordcontainers/jdito/contentProcess.js
+++ b/entity/Context_entity/recordcontainers/jdito/contentProcess.js
@@ -2,11 +2,4 @@ import("system.vars");
 import("system.result");
 import("Context_lib");
 
-if (vars.exists("$param.ContextId_param") && vars.get("$param.ContextId_param"))
-{
-    result.object(ContextUtils.getContext(vars.get("$param.ContextId_param")));
-}
-else
-{
-    result.object(ContextUtils.getContexts(true));
-}
\ No newline at end of file
+result.object(ContextUtils.getContexts(true));
diff --git a/entity/ModuleTree_entity/ModuleTree_entity.aod b/entity/ModuleTree_entity/ModuleTree_entity.aod
index 2b18e4cfd4..775888a81b 100644
--- a/entity/ModuleTree_entity/ModuleTree_entity.aod
+++ b/entity/ModuleTree_entity/ModuleTree_entity.aod
@@ -37,6 +37,16 @@
           <isConsumer v="false" />
         </entityDependency>
       </dependencies>
+      <children>
+        <entityParameter>
+          <name>ContextName_param</name>
+          <expose v="true" />
+        </entityParameter>
+        <entityParameter>
+          <name>ID_param</name>
+          <expose v="true" />
+        </entityParameter>
+      </children>
     </entityProvider>
     <entityField>
       <name>PARENT_ID</name>
diff --git a/entity/ObjectRelation_entity/entityfields/keywordobjectrelationtype/children/containername_param/valueProcess.js b/entity/ObjectRelation_entity/entityfields/keywordobjectrelationtype/children/containername_param/valueProcess.js
new file mode 100644
index 0000000000..48379a6374
--- /dev/null
+++ b/entity/ObjectRelation_entity/entityfields/keywordobjectrelationtype/children/containername_param/valueProcess.js
@@ -0,0 +1,3 @@
+import("system.result");
+
+result.string("ObjectRelationType");
\ No newline at end of file
diff --git a/entity/ObjectRelation_entity/entityfields/objectrelations/children/providertype_param/valueProcess.js b/entity/ObjectRelation_entity/entityfields/objectrelations/children/providertype_param/valueProcess.js
new file mode 100644
index 0000000000..4a2d2e1c96
--- /dev/null
+++ b/entity/ObjectRelation_entity/entityfields/objectrelations/children/providertype_param/valueProcess.js
@@ -0,0 +1,3 @@
+import("system.result");
+
+result.string("tree");
\ No newline at end of file
diff --git a/entity/Object_entity/Object_entity.aod b/entity/Object_entity/Object_entity.aod
index 7a1ca6786e..b29384ae80 100644
--- a/entity/Object_entity/Object_entity.aod
+++ b/entity/Object_entity/Object_entity.aod
@@ -75,14 +75,14 @@
           <isConsumer v="false" />
         </entityDependency>
         <entityDependency>
-          <name>1586ace7-8c27-43cc-8288-cc7a68670c09</name>
-          <entityName>ActivityLink_entity</entityName>
+          <name>445b79b3-e826-40d1-b6c2-46d62daf0818</name>
+          <entityName>TaskLink_entity</entityName>
           <fieldName>Objects</fieldName>
           <isConsumer v="false" />
         </entityDependency>
         <entityDependency>
-          <name>445b79b3-e826-40d1-b6c2-46d62daf0818</name>
-          <entityName>TaskLink_entity</entityName>
+          <name>0a2aa5c9-1ba2-41bd-b5f4-3a761efbcf2e</name>
+          <entityName>ActivityLink_entity</entityName>
           <fieldName>Objects</fieldName>
           <isConsumer v="false" />
         </entityDependency>
@@ -96,6 +96,7 @@
         <entityParameter>
           <name>ObjectType_param</name>
           <expose v="true" />
+          <triggerRecalculation v="true" />
           <mandatory v="true" />
         </entityParameter>
       </children>
diff --git a/entity/Object_entity/recordcontainers/jdito/contentProcess.js b/entity/Object_entity/recordcontainers/jdito/contentProcess.js
index fa1404cf0a..a462d8def1 100644
--- a/entity/Object_entity/recordcontainers/jdito/contentProcess.js
+++ b/entity/Object_entity/recordcontainers/jdito/contentProcess.js
@@ -1,8 +1,10 @@
+import("system.logging");
 import("system.db");
 import("system.vars");
 import("system.result");
 import("Context_lib");
-
+logging.log(vars.get("$param.ObjectType_param"))
+logging.log(vars.get("$param.ObjectRowId_param"))
 if (vars.exists("$param.ObjectType_param") && vars.get("$param.ObjectType_param"))
 {
     if (vars.exists("$param.ObjectRowId_param") && vars.get("$param.ObjectRowId_param"))
diff --git a/entity/Offer_entity/entityfields/keywordprobability/children/containername_param/valueProcess.js b/entity/Offer_entity/entityfields/keywordprobability/children/containername_param/valueProcess.js
new file mode 100644
index 0000000000..b5612781a1
--- /dev/null
+++ b/entity/Offer_entity/entityfields/keywordprobability/children/containername_param/valueProcess.js
@@ -0,0 +1,5 @@
+import("system.result");
+import("Keyword_lib");
+import("KeywordRegistry_basic");
+
+result.string($KeywordRegistry.offerProbability());
\ No newline at end of file
diff --git a/entity/Organisation_entity/entityfields/attributes/children/objectrowid_param/valueProcess.js b/entity/Organisation_entity/entityfields/attributes/children/objectrowid_param/valueProcess.js
new file mode 100644
index 0000000000..bcfda44fe7
--- /dev/null
+++ b/entity/Organisation_entity/entityfields/attributes/children/objectrowid_param/valueProcess.js
@@ -0,0 +1,4 @@
+import("system.vars");
+import("system.result");
+
+result.string(vars.get("$field.ORGANISATIONID"));
\ No newline at end of file
diff --git a/entity/Organisation_entity/entityfields/contacts/children/orgid_param/valueProcess.js b/entity/Organisation_entity/entityfields/contacts/children/orgid_param/valueProcess.js
new file mode 100644
index 0000000000..ff5cde1a52
--- /dev/null
+++ b/entity/Organisation_entity/entityfields/contacts/children/orgid_param/valueProcess.js
@@ -0,0 +1,4 @@
+import("system.result");
+import("system.vars");
+
+result.string(vars.get("$field.ORGANISATIONID"));
\ No newline at end of file
diff --git a/entity/Organisation_entity/entityfields/keywordprice_politics/children/containername_param/valueProcess.js b/entity/Organisation_entity/entityfields/keywordprice_politics/children/containername_param/valueProcess.js
new file mode 100644
index 0000000000..a76a727534
--- /dev/null
+++ b/entity/Organisation_entity/entityfields/keywordprice_politics/children/containername_param/valueProcess.js
@@ -0,0 +1,5 @@
+import("system.result");
+import("Keyword_lib");
+import("KeywordRegistry_basic");
+
+result.string($KeywordRegistry.salesprojectPricePolitics());
\ No newline at end of file
diff --git a/entity/Organisation_entity/entityfields/keywordstrenght/children/containername_param/valueProcess.js b/entity/Organisation_entity/entityfields/keywordstrenght/children/containername_param/valueProcess.js
new file mode 100644
index 0000000000..cae1ead387
--- /dev/null
+++ b/entity/Organisation_entity/entityfields/keywordstrenght/children/containername_param/valueProcess.js
@@ -0,0 +1,5 @@
+import("system.result");
+import("Keyword_lib");
+import("KeywordRegistry_basic");
+
+result.string($KeywordRegistry.salesprojectStrenght());
\ No newline at end of file
diff --git a/entity/Organisation_entity/entityfields/keywordweakness/children/containername_param/valueProcess.js b/entity/Organisation_entity/entityfields/keywordweakness/children/containername_param/valueProcess.js
new file mode 100644
index 0000000000..9973fed72b
--- /dev/null
+++ b/entity/Organisation_entity/entityfields/keywordweakness/children/containername_param/valueProcess.js
@@ -0,0 +1,5 @@
+import("system.result");
+import("Keyword_lib");
+import("KeywordRegistry_basic");
+
+result.string($KeywordRegistry.salesprojectWeakness());
\ No newline at end of file
diff --git a/entity/Product_entity/entityfields/stock/children/productid_param/valueProcess.js b/entity/Product_entity/entityfields/stock/children/productid_param/valueProcess.js
new file mode 100644
index 0000000000..24f19f3778
--- /dev/null
+++ b/entity/Product_entity/entityfields/stock/children/productid_param/valueProcess.js
@@ -0,0 +1,4 @@
+import("system.vars");
+import("system.result");
+
+result.string(vars.get("$field.PRODUCTID"));
\ No newline at end of file
diff --git a/entity/Product_entity/entityfields/stockcount/children/productid_param/valueProcess.js b/entity/Product_entity/entityfields/stockcount/children/productid_param/valueProcess.js
new file mode 100644
index 0000000000..24f19f3778
--- /dev/null
+++ b/entity/Product_entity/entityfields/stockcount/children/productid_param/valueProcess.js
@@ -0,0 +1,4 @@
+import("system.vars");
+import("system.result");
+
+result.string(vars.get("$field.PRODUCTID"));
\ No newline at end of file
diff --git a/entity/SalesprojectCompetition_entity/SalesprojectCompetition_entity.aod b/entity/SalesprojectCompetition_entity/SalesprojectCompetition_entity.aod
index c2514a37bf..937514193f 100644
--- a/entity/SalesprojectCompetition_entity/SalesprojectCompetition_entity.aod
+++ b/entity/SalesprojectCompetition_entity/SalesprojectCompetition_entity.aod
@@ -24,7 +24,6 @@
       <title>Reason</title>
       <consumer>KeywordWonLost</consumer>
       <selectionMode>SINGLE</selectionMode>
-      <onValidation>%aditoprj%/entity/SalesprojectCompetition_entity/entityfields/reason/onValidation.js</onValidation>
     </entityField>
     <entityField>
       <name>SALESPROJECT_COMPETITIONID</name>
diff --git a/entity/SalesprojectCompetition_entity/entityfields/keywordphase/children/containername_param/valueProcess.js b/entity/SalesprojectCompetition_entity/entityfields/keywordphase/children/containername_param/valueProcess.js
new file mode 100644
index 0000000000..0fda06efff
--- /dev/null
+++ b/entity/SalesprojectCompetition_entity/entityfields/keywordphase/children/containername_param/valueProcess.js
@@ -0,0 +1,5 @@
+import("system.result");
+import("Keyword_lib");
+import("KeywordRegistry_basic");
+
+result.string($KeywordRegistry.salesprojectPhase());
\ No newline at end of file
diff --git a/entity/SalesprojectCompetition_entity/entityfields/keywordprice_politics/children/containername_param/valueProcess.js b/entity/SalesprojectCompetition_entity/entityfields/keywordprice_politics/children/containername_param/valueProcess.js
new file mode 100644
index 0000000000..a76a727534
--- /dev/null
+++ b/entity/SalesprojectCompetition_entity/entityfields/keywordprice_politics/children/containername_param/valueProcess.js
@@ -0,0 +1,5 @@
+import("system.result");
+import("Keyword_lib");
+import("KeywordRegistry_basic");
+
+result.string($KeywordRegistry.salesprojectPricePolitics());
\ No newline at end of file
diff --git a/entity/SalesprojectCompetition_entity/entityfields/keywordstate/children/containername_param/valueProcess.js b/entity/SalesprojectCompetition_entity/entityfields/keywordstate/children/containername_param/valueProcess.js
new file mode 100644
index 0000000000..542db3e9e7
--- /dev/null
+++ b/entity/SalesprojectCompetition_entity/entityfields/keywordstate/children/containername_param/valueProcess.js
@@ -0,0 +1,5 @@
+import("system.result");
+import("Keyword_lib");
+import("KeywordRegistry_basic");
+
+result.string($KeywordRegistry.salesprojectCompetitionState());
\ No newline at end of file
diff --git a/entity/SalesprojectCompetition_entity/entityfields/keywordstrenght/children/containername_param/valueProcess.js b/entity/SalesprojectCompetition_entity/entityfields/keywordstrenght/children/containername_param/valueProcess.js
new file mode 100644
index 0000000000..cae1ead387
--- /dev/null
+++ b/entity/SalesprojectCompetition_entity/entityfields/keywordstrenght/children/containername_param/valueProcess.js
@@ -0,0 +1,5 @@
+import("system.result");
+import("Keyword_lib");
+import("KeywordRegistry_basic");
+
+result.string($KeywordRegistry.salesprojectStrenght());
\ No newline at end of file
diff --git a/entity/SalesprojectCompetition_entity/entityfields/keywordweakness/children/containername_param/valueProcess.js b/entity/SalesprojectCompetition_entity/entityfields/keywordweakness/children/containername_param/valueProcess.js
new file mode 100644
index 0000000000..1f3ec844e7
--- /dev/null
+++ b/entity/SalesprojectCompetition_entity/entityfields/keywordweakness/children/containername_param/valueProcess.js
@@ -0,0 +1,6 @@
+import("system.result");
+import("Keyword_lib");
+import("KeywordRegistry_basic");
+
+var sql = KeywordUtils.getResolvedTitleSqlPart($KeywordRegistry.salesprojectWeakness(), "ORGANISATION.WEAKNESS");
+result.string(sql);
\ No newline at end of file
diff --git a/entity/SalesprojectCompetition_entity/entityfields/reason/onValidation.js b/entity/SalesprojectCompetition_entity/entityfields/reason/onValidation.js
deleted file mode 100644
index dde86e982a..0000000000
--- a/entity/SalesprojectCompetition_entity/entityfields/reason/onValidation.js
+++ /dev/null
@@ -1,11 +0,0 @@
-import("system.result");
-import("system.vars");
-import("system.translate");
-import("Util_lib");
-import("Entity_lib");
-
-var reason = ProcessHandlingUtils.getOnValidationValue(vars.get("$field.REASON"));
-
-if (!vars.getString("$field.DATE_CANCELLED") && reason) {
-    result.string(translate.text("A reason is only possible if a date is given."))
-}
diff --git a/entity/Salesproject_entity/Salesproject_entity.aod b/entity/Salesproject_entity/Salesproject_entity.aod
index 3bdf5d264c..2ad5427c84 100644
--- a/entity/Salesproject_entity/Salesproject_entity.aod
+++ b/entity/Salesproject_entity/Salesproject_entity.aod
@@ -441,7 +441,6 @@
       <title>Reason</title>
       <consumer>KeywordWonLost</consumer>
       <mandatoryProcess>%aditoprj%/entity/Salesproject_entity/entityfields/reasons/mandatoryProcess.js</mandatoryProcess>
-      <possibleItemsProcess>%aditoprj%/entity/Salesproject_entity/entityfields/reasons/possibleItemsProcess.js</possibleItemsProcess>
       <searchable v="true" />
       <selectionMode>MULTI</selectionMode>
       <stateProcess>%aditoprj%/entity/Salesproject_entity/entityfields/reasons/stateProcess.js</stateProcess>
diff --git a/entity/Salesproject_entity/entityfields/keywordphase/children/containername_param/valueProcess.js b/entity/Salesproject_entity/entityfields/keywordphase/children/containername_param/valueProcess.js
new file mode 100644
index 0000000000..0fda06efff
--- /dev/null
+++ b/entity/Salesproject_entity/entityfields/keywordphase/children/containername_param/valueProcess.js
@@ -0,0 +1,5 @@
+import("system.result");
+import("Keyword_lib");
+import("KeywordRegistry_basic");
+
+result.string($KeywordRegistry.salesprojectPhase());
\ No newline at end of file
diff --git a/entity/Salesproject_entity/entityfields/keywordstate/children/containername_param/valueProcess.js b/entity/Salesproject_entity/entityfields/keywordstate/children/containername_param/valueProcess.js
new file mode 100644
index 0000000000..9604353462
--- /dev/null
+++ b/entity/Salesproject_entity/entityfields/keywordstate/children/containername_param/valueProcess.js
@@ -0,0 +1,5 @@
+import("system.result");
+import("Keyword_lib");
+import("KeywordRegistry_basic");
+
+result.string($KeywordRegistry.salesprojectState());
\ No newline at end of file
diff --git a/entity/Salesproject_entity/entityfields/reasons/mandatoryProcess.js b/entity/Salesproject_entity/entityfields/reasons/mandatoryProcess.js
index 086a5d36d4..2d2df52524 100644
--- a/entity/Salesproject_entity/entityfields/reasons/mandatoryProcess.js
+++ b/entity/Salesproject_entity/entityfields/reasons/mandatoryProcess.js
@@ -1,6 +1,9 @@
+import("system.logging");
 import("system.result");
 import("system.vars");
 
 // IDs: SalesprojectState Order and Lost
 var res = vars.get("$field.STATE") && (vars.get("$field.STATE") == 'd8a60f60-a4e6-46ee-88ec-bac53e1afedd' || vars.get("$field.STATE") == '130bb53a-a97e-455e-8f34-8d445e985474');
-result.string(res);
\ No newline at end of file
+result.string(res);
+
+logging.log(res)
\ No newline at end of file
diff --git a/entity/Salesproject_entity/entityfields/reasons/possibleItemsProcess.js b/entity/Salesproject_entity/entityfields/reasons/possibleItemsProcess.js
deleted file mode 100644
index 47fe8c4030..0000000000
--- a/entity/Salesproject_entity/entityfields/reasons/possibleItemsProcess.js
+++ /dev/null
@@ -1,9 +0,0 @@
-/*import("system.vars");
-import("system.result");
-import("system.db");
-
-var res = db.table("select KEYID, TITLE from AB_KEYWORD_ENTRY where CONTAINER = 'SalesprojectWonLost'");
-
-result.object(res);
-*/
-// TODO: multiple select
\ No newline at end of file
diff --git a/entity/Salesproject_entity/entityfields/reasons/valueProcess.js b/entity/Salesproject_entity/entityfields/reasons/valueProcess.js
index 33b4bb87b0..44b96c75cb 100644
--- a/entity/Salesproject_entity/entityfields/reasons/valueProcess.js
+++ b/entity/Salesproject_entity/entityfields/reasons/valueProcess.js
@@ -1,7 +1,11 @@
+import("system.neon");
 import("system.result");
 import("system.vars");
 
-// IDs: SalesprojectState Order and Lost
-var state = vars.get("$field.STATE");
-if(state && (state != 'd8a60f60-a4e6-46ee-88ec-bac53e1afedd' && state != '130bb53a-a97e-455e-8f34-8d445e985474'))
-    result.string("");
\ No newline at end of file
+if (vars.get("$sys.recordstate") == neon.OPERATINGSTATE_EDIT || vars.get("$sys.recordstate") == neon.OPERATINGSTATE_NEW)
+{
+    // IDs: SalesprojectState Order and Lost
+    var state = vars.get("$field.STATE");
+    if(state && (state != 'd8a60f60-a4e6-46ee-88ec-bac53e1afedd' && state != '130bb53a-a97e-455e-8f34-8d445e985474'))
+        result.string("");
+}
diff --git a/entity/Task_entity/entityfields/keywordpriority/children/containername_param/valueProcess.js b/entity/Task_entity/entityfields/keywordpriority/children/containername_param/valueProcess.js
new file mode 100644
index 0000000000..8a4cee1603
--- /dev/null
+++ b/entity/Task_entity/entityfields/keywordpriority/children/containername_param/valueProcess.js
@@ -0,0 +1,5 @@
+import("system.result");
+import("Keyword_lib");
+import("KeywordRegistry_basic");
+
+result.string($KeywordRegistry.taskPriority());
\ No newline at end of file
diff --git a/entity/Task_entity/entityfields/moduletrees/children/contextname/valueProcess.js b/entity/Task_entity/entityfields/moduletrees/children/contextname/valueProcess.js
new file mode 100644
index 0000000000..86bf9bdfc9
--- /dev/null
+++ b/entity/Task_entity/entityfields/moduletrees/children/contextname/valueProcess.js
@@ -0,0 +1,3 @@
+import("system.result");
+
+result.string("Task");
\ No newline at end of file
diff --git a/entity/Task_entity/entityfields/moduletrees/children/contextname_param/valueProcess.js b/entity/Task_entity/entityfields/moduletrees/children/contextname_param/valueProcess.js
index 86bf9bdfc9..008915f61d 100644
--- a/entity/Task_entity/entityfields/moduletrees/children/contextname_param/valueProcess.js
+++ b/entity/Task_entity/entityfields/moduletrees/children/contextname_param/valueProcess.js
@@ -1,3 +1,4 @@
 import("system.result");
+import("Context_lib");
 
-result.string("Task");
\ No newline at end of file
+result.string(ContextUtils.getCurrentContextId());
\ No newline at end of file
diff --git a/entity/Task_entity/entityfields/moduletrees/children/id/valueProcess.js b/entity/Task_entity/entityfields/moduletrees/children/id/valueProcess.js
new file mode 100644
index 0000000000..890f0a3405
--- /dev/null
+++ b/entity/Task_entity/entityfields/moduletrees/children/id/valueProcess.js
@@ -0,0 +1,4 @@
+import("system.result");
+import("system.vars");
+
+result.string(vars.get("$field.TASKID"));
\ No newline at end of file
-- 
GitLab