From 3dc4842ba956d355889991aa9266ad564284d1ba Mon Sep 17 00:00:00 2001
From: "j.goderbauer" <j.goderbauer@adito.de>
Date: Wed, 9 Sep 2020 14:37:33 +0200
Subject: [PATCH] Several scanservices

---
 .../Duplicates_entity/Duplicates_entity.aod   |   4 +-
 .../Organisation_entity.aod                   | 133 +++++++++++++++++-
 .../classificationstorage_id/valueProcess.js  |  10 --
 .../nonselfduplicates/documentation.adoc      |   3 +
 .../openaroundlocation/onActionProcess.js     |   1 -
 .../openaroundlocation/stateProcess.js        |   6 +-
 .../organisations/documentation.adoc          |   1 +
 .../selfduplicates/documentation.adoc         |   1 +
 .../withattribute/documentation.adoc          |   3 +
 entity/Person_entity/Person_entity.aod        | 102 +++++++++++---
 .../entityfields/contact/documentation.adoc   |   1 +
 .../entityfields/contacts/documentation.adoc  |   1 +
 .../documentation.adoc                        |   3 +
 .../nonselfduplicates/documentation.adoc      |   3 +
 .../organisationrelated/documentation.adoc    |   1 +
 .../quickentrycontacts/documentation.adoc     |   3 +
 .../selfduplicates/documentation.adoc         |   1 +
 .../UnlinkedMailMappingWrapper_entity.aod     |   1 +
 .../documentation.adoc                        |   6 +-
 .../forunlinkedmail/documentation.adoc        |   3 +
 20 files changed, 248 insertions(+), 39 deletions(-)
 delete mode 100644 entity/Organisation_entity/entityfields/classificationstorage_id/valueProcess.js
 create mode 100644 entity/Organisation_entity/entityfields/nonselfduplicates/documentation.adoc
 create mode 100644 entity/Organisation_entity/entityfields/organisations/documentation.adoc
 create mode 100644 entity/Organisation_entity/entityfields/selfduplicates/documentation.adoc
 create mode 100644 entity/Organisation_entity/entityfields/withattribute/documentation.adoc
 create mode 100644 entity/Person_entity/entityfields/contact/documentation.adoc
 create mode 100644 entity/Person_entity/entityfields/contacts/documentation.adoc
 create mode 100644 entity/Person_entity/entityfields/idfilteredactivecontacts/documentation.adoc
 create mode 100644 entity/Person_entity/entityfields/nonselfduplicates/documentation.adoc
 create mode 100644 entity/Person_entity/entityfields/organisationrelated/documentation.adoc
 create mode 100644 entity/Person_entity/entityfields/quickentrycontacts/documentation.adoc
 create mode 100644 entity/Person_entity/entityfields/selfduplicates/documentation.adoc
 create mode 100644 entity/UnlinkedMailMappingWrapper_entity/entityfields/forunlinkedmail/documentation.adoc

diff --git a/entity/Duplicates_entity/Duplicates_entity.aod b/entity/Duplicates_entity/Duplicates_entity.aod
index a0a699a39c..54ee932a32 100644
--- a/entity/Duplicates_entity/Duplicates_entity.aod
+++ b/entity/Duplicates_entity/Duplicates_entity.aod
@@ -112,7 +112,7 @@
       <dependency>
         <name>dependency</name>
         <entityName>Person_entity</entityName>
-        <fieldName>Contacts</fieldName>
+        <fieldName>NonselfDuplicates</fieldName>
       </dependency>
       <children>
         <entityParameter>
@@ -189,7 +189,7 @@
       <dependency>
         <name>dependency</name>
         <entityName>Organisation_entity</entityName>
-        <fieldName>Organisations</fieldName>
+        <fieldName>NonselfDuplicates</fieldName>
       </dependency>
       <children>
         <entityParameter>
diff --git a/entity/Organisation_entity/Organisation_entity.aod b/entity/Organisation_entity/Organisation_entity.aod
index deb5ee3641..43d7463ef6 100644
--- a/entity/Organisation_entity/Organisation_entity.aod
+++ b/entity/Organisation_entity/Organisation_entity.aod
@@ -112,6 +112,7 @@
     </entityFieldGroup>
     <entityProvider>
       <name>Organisations</name>
+      <documentation>%aditoprj%/entity/Organisation_entity/entityfields/organisations/documentation.adoc</documentation>
       <recordContainer>db</recordContainer>
       <dependencies>
         <entityDependency>
@@ -172,6 +173,14 @@
           <name>AttributeId_param</name>
           <expose v="false" />
         </entityParameter>
+        <entityParameter>
+          <name>DuplicateActionsControl_param</name>
+          <expose v="false" />
+        </entityParameter>
+        <entityParameter>
+          <name>DuplicateCurrentContactId_param</name>
+          <expose v="false" />
+        </entityParameter>
       </children>
     </entityProvider>
     <entityConsumer>
@@ -621,6 +630,14 @@
           <name>ExcludedContactIds_param</name>
           <expose v="false" />
         </entityParameter>
+        <entityParameter>
+          <name>DuplicateActionsControl_param</name>
+          <expose v="false" />
+        </entityParameter>
+        <entityParameter>
+          <name>DuplicateCurrentContactId_param</name>
+          <expose v="false" />
+        </entityParameter>
       </children>
     </entityProvider>
     <entityParameter>
@@ -635,6 +652,7 @@
     </entityParameter>
     <entityProvider>
       <name>WithAttribute</name>
+      <documentation>%aditoprj%/entity/Organisation_entity/entityfields/withattribute/documentation.adoc</documentation>
       <dependencies>
         <entityDependency>
           <name>10480df2-f0b6-4cb6-8bfb-4a468b994996</name>
@@ -671,6 +689,14 @@
           <name>ExcludedContactIds_param</name>
           <expose v="true" />
         </entityParameter>
+        <entityParameter>
+          <name>DuplicateActionsControl_param</name>
+          <expose v="false" />
+        </entityParameter>
+        <entityParameter>
+          <name>DuplicateCurrentContactId_param</name>
+          <expose v="false" />
+        </entityParameter>
       </children>
     </entityProvider>
     <entityParameter>
@@ -961,8 +987,39 @@
       <stateProcess>%aditoprj%/entity/Organisation_entity/entityfields/openadminview/stateProcess.js</stateProcess>
     </entityActionField>
     <entityProvider>
-      <name>SelfDuplicatesProvider</name>
+      <name>SelfDuplicates</name>
+      <documentation>%aditoprj%/entity/Organisation_entity/entityfields/selfduplicates/documentation.adoc</documentation>
       <titlePlural>Duplicates</titlePlural>
+      <children>
+        <entityParameter>
+          <name>AttributeId_param</name>
+          <expose v="false" />
+        </entityParameter>
+        <entityParameter>
+          <name>AttributeKeyId_param</name>
+          <expose v="false" />
+        </entityParameter>
+        <entityParameter>
+          <name>FilterPreSet_param</name>
+          <expose v="false" />
+        </entityParameter>
+        <entityParameter>
+          <name>OrganisationType_param</name>
+          <expose v="false" />
+        </entityParameter>
+        <entityParameter>
+          <name>WithPrivate_param</name>
+          <expose v="false" />
+        </entityParameter>
+        <entityParameter>
+          <name>OnlyOwnSupervised_param</name>
+          <expose v="false" />
+        </entityParameter>
+        <entityParameter>
+          <name>ExcludeOrganisationsByPersonId</name>
+          <expose v="false" />
+        </entityParameter>
+      </children>
     </entityProvider>
     <entityParameter>
       <name>OnlyShowContactIds_param</name>
@@ -1028,7 +1085,7 @@
       <dependency>
         <name>dependency</name>
         <entityName>Organisation_entity</entityName>
-        <fieldName>SelfDuplicatesProvider</fieldName>
+        <fieldName>SelfDuplicates</fieldName>
       </dependency>
       <children>
         <entityParameter>
@@ -1236,6 +1293,44 @@
       <name>indexP</name>
       <documentation>%aditoprj%/entity/Organisation_entity/entityfields/indexp/documentation.adoc</documentation>
       <recordContainer>index</recordContainer>
+      <children>
+        <entityParameter>
+          <name>AttributeId_param</name>
+          <expose v="false" />
+        </entityParameter>
+        <entityParameter>
+          <name>ExcludedContactIds_param</name>
+          <expose v="false" />
+        </entityParameter>
+        <entityParameter>
+          <name>OnlyShowContactIds_param</name>
+          <expose v="false" />
+        </entityParameter>
+        <entityParameter>
+          <name>DuplicateCurrentContactId_param</name>
+          <expose v="false" />
+        </entityParameter>
+        <entityParameter>
+          <name>ExcludeOrganisationsByPersonId</name>
+          <expose v="false" />
+        </entityParameter>
+        <entityParameter>
+          <name>FilterPreSet_param</name>
+          <expose v="false" />
+        </entityParameter>
+        <entityParameter>
+          <name>OnlyOwnSupervised_param</name>
+          <expose v="false" />
+        </entityParameter>
+        <entityParameter>
+          <name>WithPrivate_param</name>
+          <expose v="false" />
+        </entityParameter>
+        <entityParameter>
+          <name>OrganisationType_param</name>
+          <expose v="false" />
+        </entityParameter>
+      </children>
     </entityProvider>
     <entityConsumer>
       <name>DistrictResponsibles</name>
@@ -1255,6 +1350,40 @@
       <name>FilterPreSet_param</name>
       <expose v="true" />
     </entityParameter>
+    <entityProvider>
+      <name>NonselfDuplicates</name>
+      <documentation>%aditoprj%/entity/Organisation_entity/entityfields/nonselfduplicates/documentation.adoc</documentation>
+      <dependencies>
+        <entityDependency>
+          <name>2e410b9e-5ebc-48ea-9562-da386202d7e8</name>
+          <entityName>Duplicates_entity</entityName>
+          <fieldName>DuplicateOrganisationsConsumer</fieldName>
+          <isConsumer v="false" />
+        </entityDependency>
+      </dependencies>
+      <children>
+        <entityParameter>
+          <name>AttributeKeyId_param</name>
+          <expose v="false" />
+        </entityParameter>
+        <entityParameter>
+          <name>DuplicateCurrentContactId_param</name>
+          <expose v="false" />
+        </entityParameter>
+        <entityParameter>
+          <name>ExcludedContactIds_param</name>
+          <expose v="false" />
+        </entityParameter>
+        <entityParameter>
+          <name>OnlyShowContactIds_param</name>
+          <expose v="true" />
+        </entityParameter>
+        <entityParameter>
+          <name>OnlyOwnSupervised_param</name>
+          <expose v="false" />
+        </entityParameter>
+      </children>
+    </entityProvider>
   </entityFields>
   <recordContainers>
     <dbRecordContainer>
diff --git a/entity/Organisation_entity/entityfields/classificationstorage_id/valueProcess.js b/entity/Organisation_entity/entityfields/classificationstorage_id/valueProcess.js
deleted file mode 100644
index f7db7e7050..0000000000
--- a/entity/Organisation_entity/entityfields/classificationstorage_id/valueProcess.js
+++ /dev/null
@@ -1,10 +0,0 @@
-//import("Sql_lib");
-//import("system.result");
-//import("system.vars");
-//
-//var classification = newSelect("CLASSIFICATIONSTORAGE.CLASSIFICATIONVALUE")
-//                                .from("CLASSIFICATIONSTORAGE")
-//                                .where("CLASSIFICATIONSTORAGE.OBJECT_ROWID", vars.get("$field.ORGANISATIONID"))
-//                                .cell();
-//                                
-//result.string(classification);
diff --git a/entity/Organisation_entity/entityfields/nonselfduplicates/documentation.adoc b/entity/Organisation_entity/entityfields/nonselfduplicates/documentation.adoc
new file mode 100644
index 0000000000..dc35980c12
--- /dev/null
+++ b/entity/Organisation_entity/entityfields/nonselfduplicates/documentation.adoc
@@ -0,0 +1,3 @@
+Provides organisation duplicate-records without the `Organisation_entity` scope, for example for the `Duplicates_entity`.
+
+The provider is named `NonselfDuplicates` to differentiate this provider and the `SelfDuplicates`-provider.
\ No newline at end of file
diff --git a/entity/Organisation_entity/entityfields/openaroundlocation/onActionProcess.js b/entity/Organisation_entity/entityfields/openaroundlocation/onActionProcess.js
index df10e3d43c..3ede9b6084 100644
--- a/entity/Organisation_entity/entityfields/openaroundlocation/onActionProcess.js
+++ b/entity/Organisation_entity/entityfields/openaroundlocation/onActionProcess.js
@@ -5,7 +5,6 @@ import("system.neon");
 var rowConfig = entities.createConfigForLoadingRows()
     .fields(["STANDARD_LAT", "STANDARD_LON"])
     .entity("Organisation_entity")
-//    .entity(vars.get("$sys.currententityname"))
     .uid(vars.get("$sys.uid"));
 var row = entities.getRow(rowConfig);
 
diff --git a/entity/Organisation_entity/entityfields/openaroundlocation/stateProcess.js b/entity/Organisation_entity/entityfields/openaroundlocation/stateProcess.js
index a2899dea4d..129f026470 100644
--- a/entity/Organisation_entity/entityfields/openaroundlocation/stateProcess.js
+++ b/entity/Organisation_entity/entityfields/openaroundlocation/stateProcess.js
@@ -3,11 +3,7 @@ import("system.neon");
 import("system.vars");
 import("system.entities");
 
-//todo: only visible if location tracking is enabled
-
-
-//todo: use read entity and comment why (data is not loaded)
-
+//use read entity since the lat and lon fields are not loaded by default since they are not needed otherwise
 var rowConfig = entities.createConfigForLoadingRows()
     .fields(["STANDARD_LAT", "STANDARD_LON"])
     .entity(vars.get("$sys.currententityname"))
diff --git a/entity/Organisation_entity/entityfields/organisations/documentation.adoc b/entity/Organisation_entity/entityfields/organisations/documentation.adoc
new file mode 100644
index 0000000000..69b5814ae9
--- /dev/null
+++ b/entity/Organisation_entity/entityfields/organisations/documentation.adoc
@@ -0,0 +1 @@
+Provides several organisation contacts for basic use cases.
\ No newline at end of file
diff --git a/entity/Organisation_entity/entityfields/selfduplicates/documentation.adoc b/entity/Organisation_entity/entityfields/selfduplicates/documentation.adoc
new file mode 100644
index 0000000000..396162acb9
--- /dev/null
+++ b/entity/Organisation_entity/entityfields/selfduplicates/documentation.adoc
@@ -0,0 +1 @@
+Provides organisation duplicate-records within the `Organisation_entity` scope itself.
\ No newline at end of file
diff --git a/entity/Organisation_entity/entityfields/withattribute/documentation.adoc b/entity/Organisation_entity/entityfields/withattribute/documentation.adoc
new file mode 100644
index 0000000000..4b77444176
--- /dev/null
+++ b/entity/Organisation_entity/entityfields/withattribute/documentation.adoc
@@ -0,0 +1,3 @@
+Provides organisation contacts where one attribute has a specific, given value.
+
+Use case: "give me all organizations where loyalty has the value high".
\ No newline at end of file
diff --git a/entity/Person_entity/Person_entity.aod b/entity/Person_entity/Person_entity.aod
index 367ab7a019..3d84d402a3 100644
--- a/entity/Person_entity/Person_entity.aod
+++ b/entity/Person_entity/Person_entity.aod
@@ -116,6 +116,7 @@
     </entityField>
     <entityProvider>
       <name>OrganisationRelated</name>
+      <documentation>%aditoprj%/entity/Person_entity/entityfields/organisationrelated/documentation.adoc</documentation>
       <recordContainer>db</recordContainer>
       <dependencies>
         <entityDependency>
@@ -138,6 +139,10 @@
           <name>OnlyActive_param</name>
           <expose v="false" />
         </entityParameter>
+        <entityParameter>
+          <name>DuplicateCurrentContactId_param</name>
+          <expose v="false" />
+        </entityParameter>
       </children>
     </entityProvider>
     <entityField>
@@ -345,6 +350,7 @@
     </entityFieldGroup>
     <entityProvider>
       <name>Contact</name>
+      <documentation>%aditoprj%/entity/Person_entity/entityfields/contact/documentation.adoc</documentation>
       <recordContainer>db</recordContainer>
       <dependencies>
         <entityDependency>
@@ -372,6 +378,14 @@
           <name>OnlyActive_param</name>
           <expose v="false" />
         </entityParameter>
+        <entityParameter>
+          <name>DuplicateCurrentContactId_param</name>
+          <expose v="false" />
+        </entityParameter>
+        <entityParameter>
+          <name>DuplicateActionsControl_param</name>
+          <expose v="false" />
+        </entityParameter>
       </children>
     </entityProvider>
     <entityConsumer>
@@ -687,6 +701,7 @@
     </entityParameter>
     <entityProvider>
       <name>Contacts</name>
+      <documentation>%aditoprj%/entity/Person_entity/entityfields/contacts/documentation.adoc</documentation>
       <dependencies>
         <entityDependency>
           <name>c98da62f-d6b2-4ddb-9101-92e9a60abdfb</name>
@@ -722,6 +737,10 @@
           <name>OnlyActive_param</name>
           <expose v="false" />
         </entityParameter>
+        <entityParameter>
+          <name>DuplicateCurrentContactId_param</name>
+          <expose v="false" />
+        </entityParameter>
       </children>
     </entityProvider>
     <entityConsumer>
@@ -901,7 +920,7 @@
       <dependency>
         <name>dependency</name>
         <entityName>Person_entity</entityName>
-        <fieldName>SelfDuplicatesProvider</fieldName>
+        <fieldName>SelfDuplicates</fieldName>
       </dependency>
       <children>
         <entityParameter>
@@ -949,6 +968,7 @@
     </entityField>
     <entityProvider>
       <name>QuickEntryContacts</name>
+      <documentation>%aditoprj%/entity/Person_entity/entityfields/quickentrycontacts/documentation.adoc</documentation>
       <titlePlural>Additional Contacts</titlePlural>
       <dependencies>
         <entityDependency>
@@ -971,6 +991,14 @@
           <name>OnlyActive_param</name>
           <expose v="false" />
         </entityParameter>
+        <entityParameter>
+          <name>DuplicateActionsControl_param</name>
+          <expose v="false" />
+        </entityParameter>
+        <entityParameter>
+          <name>DuplicateCurrentContactId_param</name>
+          <expose v="false" />
+        </entityParameter>
       </children>
     </entityProvider>
     <entityActionField>
@@ -1146,25 +1174,10 @@
       <name>OnlyShowContactIds_param</name>
       <expose v="true" />
     </entityParameter>
-    <entityConsumer>
-      <name>SelfDuplicates</name>
-      <dependency>
-        <name>dependency</name>
-        <entityName>Person_entity</entityName>
-        <fieldName>SelfDuplicatesProvider</fieldName>
-      </dependency>
-    </entityConsumer>
     <entityProvider>
-      <name>SelfDuplicatesProvider</name>
+      <name>SelfDuplicates</name>
+      <documentation>%aditoprj%/entity/Person_entity/entityfields/selfduplicates/documentation.adoc</documentation>
       <titlePlural>Duplicates</titlePlural>
-      <dependencies>
-        <entityDependency>
-          <name>f6d16008-1764-4920-8ea5-c95c6a67f508</name>
-          <entityName>Person_entity</entityName>
-          <fieldName>SelfDuplicates</fieldName>
-          <isConsumer v="false" />
-        </entityDependency>
-      </dependencies>
       <children>
         <entityParameter>
           <name>OnlyShowContactIds_param</name>
@@ -1174,6 +1187,18 @@
           <name>OnlyActive_param</name>
           <expose v="false" />
         </entityParameter>
+        <entityParameter>
+          <name>OrgId_param</name>
+          <expose v="false" />
+        </entityParameter>
+        <entityParameter>
+          <name>OnlyOwnSupervised_param</name>
+          <expose v="false" />
+        </entityParameter>
+        <entityParameter>
+          <name>ContactId_param</name>
+          <expose v="false" />
+        </entityParameter>
       </children>
     </entityProvider>
     <entityField>
@@ -1213,6 +1238,7 @@
     </entityActionField>
     <entityProvider>
       <name>IdFilteredActiveContacts</name>
+      <documentation>%aditoprj%/entity/Person_entity/entityfields/idfilteredactivecontacts/documentation.adoc</documentation>
       <dependencies>
         <entityDependency>
           <name>511f3e4c-7493-4a31-a136-0ba80ba2ec85</name>
@@ -1270,6 +1296,12 @@
       <name>indexP</name>
       <documentation>%aditoprj%/entity/Person_entity/entityfields/indexp/documentation.adoc</documentation>
       <recordContainer>index</recordContainer>
+      <children>
+        <entityParameter>
+          <name>DuplicateActionsControl_param</name>
+          <expose v="false" />
+        </entityParameter>
+      </children>
     </entityProvider>
     <entityField>
       <name>PERSON_OBJECTTYPE</name>
@@ -1293,6 +1325,40 @@
         </entityParameter>
       </children>
     </entityConsumer>
+    <entityProvider>
+      <name>NonselfDuplicates</name>
+      <documentation>%aditoprj%/entity/Person_entity/entityfields/nonselfduplicates/documentation.adoc</documentation>
+      <dependencies>
+        <entityDependency>
+          <name>3a4352e2-9686-4c52-9d01-dbfad8c68ea7</name>
+          <entityName>Duplicates_entity</entityName>
+          <fieldName>DuplicatePersonsConsumer</fieldName>
+          <isConsumer v="false" />
+        </entityDependency>
+      </dependencies>
+      <children>
+        <entityParameter>
+          <name>ContactId_param</name>
+          <expose v="false" />
+        </entityParameter>
+        <entityParameter>
+          <name>DuplicateCurrentContactId_param</name>
+          <expose v="false" />
+        </entityParameter>
+        <entityParameter>
+          <name>OnlyShowContactIds_param</name>
+          <expose v="true" />
+        </entityParameter>
+        <entityParameter>
+          <name>OrgId_param</name>
+          <expose v="false" />
+        </entityParameter>
+        <entityParameter>
+          <name>OnlyOwnSupervised_param</name>
+          <expose v="false" />
+        </entityParameter>
+      </children>
+    </entityProvider>
   </entityFields>
   <recordContainers>
     <dbRecordContainer>
diff --git a/entity/Person_entity/entityfields/contact/documentation.adoc b/entity/Person_entity/entityfields/contact/documentation.adoc
new file mode 100644
index 0000000000..e289ce7180
--- /dev/null
+++ b/entity/Person_entity/entityfields/contact/documentation.adoc
@@ -0,0 +1 @@
+Provides excactly one or none person contact.
\ No newline at end of file
diff --git a/entity/Person_entity/entityfields/contacts/documentation.adoc b/entity/Person_entity/entityfields/contacts/documentation.adoc
new file mode 100644
index 0000000000..ee82569190
--- /dev/null
+++ b/entity/Person_entity/entityfields/contacts/documentation.adoc
@@ -0,0 +1 @@
+Provides several person contacts.
\ No newline at end of file
diff --git a/entity/Person_entity/entityfields/idfilteredactivecontacts/documentation.adoc b/entity/Person_entity/entityfields/idfilteredactivecontacts/documentation.adoc
new file mode 100644
index 0000000000..d9bacf9834
--- /dev/null
+++ b/entity/Person_entity/entityfields/idfilteredactivecontacts/documentation.adoc
@@ -0,0 +1,3 @@
+Provides person contacts that are active (default) and excludes contacts with given IDs. 
+
+This is useful for lists where person contacts can be chosen only once.
\ No newline at end of file
diff --git a/entity/Person_entity/entityfields/nonselfduplicates/documentation.adoc b/entity/Person_entity/entityfields/nonselfduplicates/documentation.adoc
new file mode 100644
index 0000000000..d7964dadc0
--- /dev/null
+++ b/entity/Person_entity/entityfields/nonselfduplicates/documentation.adoc
@@ -0,0 +1,3 @@
+Provides contact duplicate-records without the `Person_entity` scope, for example for the `Duplicates_entity`.
+
+The provider is named `NonselfDuplicates` to differentiate this provider and the `SelfDuplicates`-provider.
\ No newline at end of file
diff --git a/entity/Person_entity/entityfields/organisationrelated/documentation.adoc b/entity/Person_entity/entityfields/organisationrelated/documentation.adoc
new file mode 100644
index 0000000000..d3ad0acc86
--- /dev/null
+++ b/entity/Person_entity/entityfields/organisationrelated/documentation.adoc
@@ -0,0 +1 @@
+Provides person contacts for one specific (given) organisation.
\ No newline at end of file
diff --git a/entity/Person_entity/entityfields/quickentrycontacts/documentation.adoc b/entity/Person_entity/entityfields/quickentrycontacts/documentation.adoc
new file mode 100644
index 0000000000..e512d6ef8e
--- /dev/null
+++ b/entity/Person_entity/entityfields/quickentrycontacts/documentation.adoc
@@ -0,0 +1,3 @@
+Provides the `Person_entity` for the Quickinsert-use-case:
+
+The `Quickinsert_entity` is only used to create new records, not to update, delete or show them.
\ No newline at end of file
diff --git a/entity/Person_entity/entityfields/selfduplicates/documentation.adoc b/entity/Person_entity/entityfields/selfduplicates/documentation.adoc
new file mode 100644
index 0000000000..4f02d8b1a2
--- /dev/null
+++ b/entity/Person_entity/entityfields/selfduplicates/documentation.adoc
@@ -0,0 +1 @@
+Provides contact duplicate-records within the `Person_entity` scope itself.
\ No newline at end of file
diff --git a/entity/UnlinkedMailMappingWrapper_entity/UnlinkedMailMappingWrapper_entity.aod b/entity/UnlinkedMailMappingWrapper_entity/UnlinkedMailMappingWrapper_entity.aod
index d82d86fc8e..42eb73a718 100644
--- a/entity/UnlinkedMailMappingWrapper_entity/UnlinkedMailMappingWrapper_entity.aod
+++ b/entity/UnlinkedMailMappingWrapper_entity/UnlinkedMailMappingWrapper_entity.aod
@@ -11,6 +11,7 @@
     </entityProvider>
     <entityProvider>
       <name>ForUnlinkedMail</name>
+      <documentation>%aditoprj%/entity/UnlinkedMailMappingWrapper_entity/entityfields/forunlinkedmail/documentation.adoc</documentation>
       <children>
         <entityParameter>
           <name>UnlinkedMailId_param</name>
diff --git a/entity/UnlinkedMailMappingWrapper_entity/documentation.adoc b/entity/UnlinkedMailMappingWrapper_entity/documentation.adoc
index 8559ac9a3d..27350aa271 100644
--- a/entity/UnlinkedMailMappingWrapper_entity/documentation.adoc
+++ b/entity/UnlinkedMailMappingWrapper_entity/documentation.adoc
@@ -1,3 +1,7 @@
 = UnlinkedMailMappingWrapper_entity
 
-For manual linking of an unlinked mail
\ No newline at end of file
+For manual linking of an unlinked mail
+
+WARNING: This is deprecated and should not longer be used. Activites are now created always and have some or no activity links.
+
+//todo: remove entity
\ No newline at end of file
diff --git a/entity/UnlinkedMailMappingWrapper_entity/entityfields/forunlinkedmail/documentation.adoc b/entity/UnlinkedMailMappingWrapper_entity/entityfields/forunlinkedmail/documentation.adoc
new file mode 100644
index 0000000000..1f1f3de9c7
--- /dev/null
+++ b/entity/UnlinkedMailMappingWrapper_entity/entityfields/forunlinkedmail/documentation.adoc
@@ -0,0 +1,3 @@
+Provides a wrapper for Unlinked Mails. 
+
+WARNING: This is deprecated and should not longer be used. Activites are now created always and have some or no activity links.
\ No newline at end of file
-- 
GitLab