From 06920c388214568574b258d1cd3976ee44befd80 Mon Sep 17 00:00:00 2001
From: "j.goderbauer" <j.goderbauer@adito.de>
Date: Wed, 13 Jun 2018 10:29:25 +0200
Subject: [PATCH] [Projekt: xRM-Basic][TicketNr.: 1018101][Beginn mit Umsetzung
 der Entity "ORG"]

---
 aliasDefinition/Data_alias/Data_alias.aod     | 261 ++++++++++++++++++
 .../_____SYSTEM_APPLICATION_NEON.aod          |  14 +-
 entity/Org_entity/Org_entity.aod              | 127 +++++++++
 .../language/possibleItemsProcess.js          | 157 +++++++++++
 .../status/possibleItemsProcess.js            |   9 +
 .../entityfields/type/possibleItemsProcess.js |   6 +
 entity/Org_entity/fromClauseProcess.js        |   3 +
 .../_____LANGUAGE_de/_____LANGUAGE_de.aod     |  44 ++-
 neonContext/Org_context/Org_context.aod       |  25 ++
 neonView/OrgBasic_view/OrgBasic_view.aod      |  32 +++
 .../OrgDetailed_view/OrgDetailed_view.aod     |  41 +++
 neonView/OrgList_view/OrgList_view.aod        |  35 +++
 others/db_changes/data/example_org.xml        |  38 +++
 others/db_changes/masterChangelog.xml         |   3 +-
 others/db_changes/struct/create_org.xml       |  40 +++
 15 files changed, 831 insertions(+), 4 deletions(-)
 create mode 100644 entity/Org_entity/Org_entity.aod
 create mode 100644 entity/Org_entity/entityfields/language/possibleItemsProcess.js
 create mode 100644 entity/Org_entity/entityfields/status/possibleItemsProcess.js
 create mode 100644 entity/Org_entity/entityfields/type/possibleItemsProcess.js
 create mode 100644 entity/Org_entity/fromClauseProcess.js
 create mode 100644 neonContext/Org_context/Org_context.aod
 create mode 100644 neonView/OrgBasic_view/OrgBasic_view.aod
 create mode 100644 neonView/OrgDetailed_view/OrgDetailed_view.aod
 create mode 100644 neonView/OrgList_view/OrgList_view.aod
 create mode 100644 others/db_changes/data/example_org.xml
 create mode 100644 others/db_changes/struct/create_org.xml

diff --git a/aliasDefinition/Data_alias/Data_alias.aod b/aliasDefinition/Data_alias/Data_alias.aod
index 25e6f1bc5a5..2cf7a72ac6d 100644
--- a/aliasDefinition/Data_alias/Data_alias.aod
+++ b/aliasDefinition/Data_alias/Data_alias.aod
@@ -7,6 +7,267 @@
     <aliasDefDb>
       <entityGroup>
         <name>entityGroup</name>
+        <entities>
+          <entityDb>
+            <name>ORG</name>
+            <dbName></dbName>
+            <idColumn>ORGID</idColumn>
+            <idGeneratorType v="0" />
+            <idGeneratorInterval v="1" />
+            <title></title>
+            <description></description>
+            <auditSyncConfig>
+              <name>auditSyncConfig</name>
+              <auditMode v="0" />
+              <syncActive v="false" />
+              <syncComplete v="true" />
+              <syncDirection v="1" />
+              <syncIds></syncIds>
+            </auditSyncConfig>
+            <entityFields>
+              <entityFieldDb>
+                <name>ORGID</name>
+                <dbName></dbName>
+                <primaryKey v="true" />
+                <columnType v="1" />
+                <size v="36" />
+                <scale v="0" />
+                <notNull v="true" />
+                <isUnique v="true" />
+                <index v="false" />
+                <title></title>
+                <description></description>
+              </entityFieldDb>
+              <entityFieldDb>
+                <name>CUSTOMERCODE</name>
+                <dbName></dbName>
+                <primaryKey v="false" />
+                <columnType v="12" />
+                <size v="30" />
+                <scale v="0" />
+                <notNull v="false" />
+                <isUnique v="false" />
+                <index v="false" />
+                <title></title>
+                <description></description>
+              </entityFieldDb>
+              <entityFieldDb>
+                <name>DATE_EDIT</name>
+                <dbName></dbName>
+                <primaryKey v="false" />
+                <columnType v="93" />
+                <size v="29" />
+                <scale v="9" />
+                <notNull v="false" />
+                <isUnique v="false" />
+                <index v="false" />
+                <title></title>
+                <description></description>
+              </entityFieldDb>
+              <entityFieldDb>
+                <name>DATE_NEW</name>
+                <dbName></dbName>
+                <primaryKey v="false" />
+                <columnType v="93" />
+                <size v="29" />
+                <scale v="9" />
+                <notNull v="true" />
+                <isUnique v="false" />
+                <index v="false" />
+                <title></title>
+                <description></description>
+              </entityFieldDb>
+              <entityFieldDb>
+                <name>USER_NEW</name>
+                <dbName></dbName>
+                <primaryKey v="false" />
+                <columnType v="12" />
+                <size v="50" />
+                <scale v="0" />
+                <notNull v="true" />
+                <isUnique v="false" />
+                <index v="false" />
+                <title></title>
+                <description></description>
+              </entityFieldDb>
+              <entityFieldDb>
+                <name>INFO</name>
+                <dbName></dbName>
+                <primaryKey v="false" />
+                <columnType v="2005" />
+                <size v="2147483647" />
+                <scale v="0" />
+                <notNull v="false" />
+                <isUnique v="false" />
+                <index v="false" />
+                <title></title>
+                <description></description>
+              </entityFieldDb>
+              <entityFieldDb>
+                <name>USER_EDIT</name>
+                <dbName></dbName>
+                <primaryKey v="false" />
+                <columnType v="12" />
+                <size v="50" />
+                <scale v="0" />
+                <notNull v="false" />
+                <isUnique v="false" />
+                <index v="false" />
+                <title></title>
+                <description></description>
+              </entityFieldDb>
+              <entityFieldDb>
+                <name>NAME</name>
+                <dbName></dbName>
+                <primaryKey v="false" />
+                <columnType v="12" />
+                <size v="255" />
+                <scale v="0" />
+                <notNull v="false" />
+                <isUnique v="false" />
+                <index v="false" />
+                <title></title>
+                <description></description>
+              </entityFieldDb>
+              <entityFieldDb>
+                <name>TYPE</name>
+                <dbName></dbName>
+                <primaryKey v="false" />
+                <columnType v="5" />
+                <size v="5" />
+                <scale v="0" />
+                <notNull v="false" />
+                <isUnique v="false" />
+                <index v="false" />
+                <title></title>
+                <description></description>
+              </entityFieldDb>
+            </entityFields>
+          </entityDb>
+          <entityDb>
+            <name>RELATION</name>
+            <dbName></dbName>
+            <idColumn>RELATIONID</idColumn>
+            <idGeneratorType v="0" />
+            <idGeneratorInterval v="1" />
+            <title></title>
+            <description></description>
+            <auditSyncConfig>
+              <name>auditSyncConfig</name>
+              <auditMode v="0" />
+              <syncActive v="false" />
+              <syncComplete v="true" />
+              <syncDirection v="1" />
+              <syncIds></syncIds>
+            </auditSyncConfig>
+            <entityFields>
+              <entityFieldDb>
+                <name>LANGUAGE</name>
+                <dbName></dbName>
+                <primaryKey v="false" />
+                <columnType v="1" />
+                <size v="5" />
+                <scale v="0" />
+                <notNull v="false" />
+                <isUnique v="false" />
+                <index v="false" />
+                <title></title>
+                <description></description>
+              </entityFieldDb>
+              <entityFieldDb>
+                <name>RELATIONID</name>
+                <dbName></dbName>
+                <primaryKey v="true" />
+                <columnType v="1" />
+                <size v="36" />
+                <scale v="0" />
+                <notNull v="true" />
+                <isUnique v="true" />
+                <index v="false" />
+                <title></title>
+                <description></description>
+              </entityFieldDb>
+              <entityFieldDb>
+                <name>ORG_ID</name>
+                <dbName></dbName>
+                <primaryKey v="false" />
+                <columnType v="1" />
+                <size v="36" />
+                <scale v="0" />
+                <notNull v="true" />
+                <isUnique v="false" />
+                <index v="true" />
+                <title></title>
+                <description></description>
+              </entityFieldDb>
+              <entityFieldDb>
+                <name>STATUS</name>
+                <dbName></dbName>
+                <primaryKey v="false" />
+                <columnType v="5" />
+                <size v="5" />
+                <scale v="0" />
+                <notNull v="false" />
+                <isUnique v="false" />
+                <index v="false" />
+                <title></title>
+                <description></description>
+              </entityFieldDb>
+              <entityFieldDb>
+                <name>DATE_EDIT</name>
+                <dbName></dbName>
+                <primaryKey v="false" />
+                <columnType v="93" />
+                <size v="29" />
+                <scale v="9" />
+                <notNull v="false" />
+                <isUnique v="false" />
+                <index v="false" />
+                <title></title>
+                <description></description>
+              </entityFieldDb>
+              <entityFieldDb>
+                <name>DATE_NEW</name>
+                <dbName></dbName>
+                <primaryKey v="false" />
+                <columnType v="93" />
+                <size v="29" />
+                <scale v="9" />
+                <notNull v="true" />
+                <isUnique v="false" />
+                <index v="false" />
+                <title></title>
+                <description></description>
+              </entityFieldDb>
+              <entityFieldDb>
+                <name>USER_NEW</name>
+                <dbName></dbName>
+                <primaryKey v="false" />
+                <columnType v="12" />
+                <size v="50" />
+                <scale v="0" />
+                <notNull v="true" />
+                <isUnique v="false" />
+                <index v="false" />
+                <title></title>
+                <description></description>
+              </entityFieldDb>
+              <entityFieldDb>
+                <name>USER_EDIT</name>
+                <dbName></dbName>
+                <primaryKey v="false" />
+                <columnType v="12" />
+                <size v="50" />
+                <scale v="0" />
+                <notNull v="false" />
+                <isUnique v="false" />
+                <index v="false" />
+                <title></title>
+                <description></description>
+              </entityFieldDb>
+            </entityFields>
+          </entityDb>
+        </entities>
       </entityGroup>
     </aliasDefDb>
   </aliasDefinitionSub>
diff --git a/application/_____SYSTEM_APPLICATION_NEON/_____SYSTEM_APPLICATION_NEON.aod b/application/_____SYSTEM_APPLICATION_NEON/_____SYSTEM_APPLICATION_NEON.aod
index c028d18ebab..369032d07f8 100644
--- a/application/_____SYSTEM_APPLICATION_NEON/_____SYSTEM_APPLICATION_NEON.aod
+++ b/application/_____SYSTEM_APPLICATION_NEON/_____SYSTEM_APPLICATION_NEON.aod
@@ -2,7 +2,19 @@
 <application xmlns="http://www.adito.de/2018/ao/Model" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" VERSION="1.1.8" xsi:schemaLocation="http://www.adito.de/2018/ao/Model adito://models/xsd/application/1.1.8">
   <name>_____SYSTEM_APPLICATION_NEON</name>
   <majorModelMode>DISTRIBUTED</majorModelMode>
-  <entityNode name="_____SYSTEM_COMPANY" kind="200" />
+  <entityNode name="_____SYSTEM_COMPANY" kind="200">
+    <node name="CONTACTS" kind="123" title="Contactmanagement">
+      <node name="Group3" kind="123" title="">
+        <node name="Org_context" kind="10077" />
+        <node name="INTERNAL_DESIGNER" kind="159" />
+        <node name="INTERNAL_GROUPWARE" kind="159" />
+        <node name="INTERNAL_SNMP" kind="159" />
+        <node name="INTERNAL_TECHNICAL" kind="159" />
+        <node name="INTERNAL_WEBSERVICE" kind="159" />
+        <node name="INTERNAL_ADMINISTRATOR" kind="159" />
+      </node>
+    </node>
+  </entityNode>
   <company>
     <name>company</name>
   </company>
diff --git a/entity/Org_entity/Org_entity.aod b/entity/Org_entity/Org_entity.aod
new file mode 100644
index 00000000000..81cb2ffd63e
--- /dev/null
+++ b/entity/Org_entity/Org_entity.aod
@@ -0,0 +1,127 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<entity xmlns="http://www.adito.de/2018/ao/Model" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" VERSION="1.0.3" xsi:schemaLocation="http://www.adito.de/2018/ao/Model adito://models/xsd/entity/1.0.3">
+  <name>Org_entity</name>
+  <majorModelMode>DISTRIBUTED</majorModelMode>
+  <alias>Data_alias</alias>
+  <fromClauseProcess>%aditoprj%/entity/Org_entity/fromClauseProcess.js</fromClauseProcess>
+  <recordContainerType>DB</recordContainerType>
+  <entityFields>
+    <entityField>
+      <name>CUSTOMERCODE</name>
+      <tableName>ORG</tableName>
+      <columnName>CUSTOMERCODE</columnName>
+      <caption>Customercode</caption>
+      <contentType>TEXT</contentType>
+    </entityField>
+    <entityField>
+      <name>ORG_DATE_EDIT</name>
+      <tableName>ORG</tableName>
+      <columnName>DATE_EDIT</columnName>
+      <resolution>SECOND</resolution>
+      <outputFormat>yyyy-MM-dd&amp;apos;T&amp;apos;HH:mm:ssZ</outputFormat>
+    </entityField>
+    <entityField>
+      <name>ORG_DATE_NEW</name>
+      <tableName>ORG</tableName>
+      <columnName>DATE_NEW</columnName>
+      <resolution>SECOND</resolution>
+      <outputFormat>yyyy-MM-dd&amp;apos;T&amp;apos;HH:mm:ssZ</outputFormat>
+    </entityField>
+    <entityField>
+      <name>INFO</name>
+      <tableName>ORG</tableName>
+      <columnName>INFO</columnName>
+      <caption>Information</caption>
+      <contentType>HTML</contentType>
+    </entityField>
+    <entityField>
+      <name>NAME</name>
+      <tableName>ORG</tableName>
+      <columnName>NAME</columnName>
+      <caption>Name</caption>
+    </entityField>
+    <entityField>
+      <name>ORGID</name>
+      <tableName>ORG</tableName>
+      <columnName>ORGID</columnName>
+    </entityField>
+    <entityField>
+      <name>ORG_USER_EDIT</name>
+      <tableName>ORG</tableName>
+      <columnName>USER_EDIT</columnName>
+    </entityField>
+    <entityField>
+      <name>ORG_USER_NEW</name>
+      <tableName>ORG</tableName>
+      <columnName>USER_NEW</columnName>
+    </entityField>
+    <entityField>
+      <name>REL_DATE_EDIT</name>
+      <tableName>RELATION</tableName>
+      <columnName>DATE_EDIT</columnName>
+      <resolution>SECOND</resolution>
+      <outputFormat>yyyy-MM-dd&amp;apos;T&amp;apos;HH:mm:ssZ</outputFormat>
+    </entityField>
+    <entityField>
+      <name>REL_DATE_NEW</name>
+      <tableName>RELATION</tableName>
+      <columnName>DATE_NEW</columnName>
+      <resolution>SECOND</resolution>
+      <outputFormat>yyyy-MM-dd&amp;apos;T&amp;apos;HH:mm:ssZ</outputFormat>
+    </entityField>
+    <entityField>
+      <name>LANGUAGE</name>
+      <tableName>RELATION</tableName>
+      <columnName>LANGUAGE</columnName>
+      <caption>Language</caption>
+      <possibleItemsProcess>%aditoprj%/entity/Org_entity/entityfields/language/possibleItemsProcess.js</possibleItemsProcess>
+    </entityField>
+    <entityField>
+      <name>ORG_ID</name>
+      <tableName>RELATION</tableName>
+      <columnName>ORG_ID</columnName>
+    </entityField>
+    <entityField>
+      <name>RELATIONID</name>
+      <tableName>RELATION</tableName>
+      <columnName>RELATIONID</columnName>
+    </entityField>
+    <entityField>
+      <name>STATUS</name>
+      <tableName>RELATION</tableName>
+      <columnName>STATUS</columnName>
+      <caption>Status</caption>
+      <possibleItemsProcess>%aditoprj%/entity/Org_entity/entityfields/status/possibleItemsProcess.js</possibleItemsProcess>
+    </entityField>
+    <entityField>
+      <name>REL_USER_EDIT</name>
+      <tableName>RELATION</tableName>
+      <columnName>USER_EDIT</columnName>
+    </entityField>
+    <entityField>
+      <name>REL_USER_NEW</name>
+      <tableName>RELATION</tableName>
+      <columnName>USER_NEW</columnName>
+    </entityField>
+    <entityField>
+      <name>TYPE</name>
+      <tableName>ORG</tableName>
+      <columnName>TYPE</columnName>
+      <caption>Type</caption>
+      <possibleItemsProcess>%aditoprj%/entity/Org_entity/entityfields/type/possibleItemsProcess.js</possibleItemsProcess>
+    </entityField>
+  </entityFields>
+  <linkInformation>
+    <linkInformation>
+      <name>7fe13e6e-8605-44e1-989b-41e103f5c884</name>
+      <tableName>ORG</tableName>
+      <primaryKey>ORGID</primaryKey>
+      <isUIDTable v="true" />
+    </linkInformation>
+    <linkInformation>
+      <name>181abde8-149c-44f1-bc1b-90635e314fab</name>
+      <tableName>RELATION</tableName>
+      <primaryKey>RELATIONID</primaryKey>
+    </linkInformation>
+  </linkInformation>
+</entity>
diff --git a/entity/Org_entity/entityfields/language/possibleItemsProcess.js b/entity/Org_entity/entityfields/language/possibleItemsProcess.js
new file mode 100644
index 00000000000..e7cea6054eb
--- /dev/null
+++ b/entity/Org_entity/entityfields/language/possibleItemsProcess.js
@@ -0,0 +1,157 @@
+import("system.result");
+
+var languages = [
+     ["ar", "Arabisch"]
+    ,["ar_AE", "Arabisch (Vereinigte Arabische Emirate)"]
+    ,["ar_BH", "Arabisch (Bahrain)"]
+    ,["ar_DZ", "Arabisch (Algerien)"]
+    ,["ar_EG", "Arabisch (Ägypten)"]
+    ,["ar_IQ", "Arabisch (Irak)"]
+    ,["ar_JO", "Arabisch (Jordanien)"]
+    ,["ar_KW", "Arabisch (Kuwait)"]
+    ,["ar_LB", "Arabisch (Libanon)"]
+    ,["ar_LY", "Arabisch (Libyen)"]
+    ,["ar_MA", "Arabisch (Marokko)"]
+    ,["ar_OM", "Arabisch (Oman)"]
+    ,["ar_QA", "Arabisch (Katar)"]
+    ,["ar_SA", "Arabisch (Saudi-Arabien)"]
+    ,["ar_SD", "Arabisch (Sudan)"]
+    ,["ar_SY", "Arabisch (Syrien)"]
+    ,["ar_TN", "Arabisch (Tunesien)"]
+    ,["ar_YE", "Arabisch (Jemen)"]
+    ,["be", "Belorussisch"]
+    ,["be_BY", "Belorussisch (Belarus)"]
+    ,["bg", "Bulgarisch"]
+    ,["bg_BG", "Bulgarisch (Bulgarien)"]
+    ,["ca", "Katalanisch"]
+    ,["ca_ES", "Katalanisch (Spanien)"]
+    ,["cs", "Tschechisch"]
+    ,["cs_CZ", "Tschechisch (Tschechische Republik)"]
+    ,["da", "Dänisch"]
+    ,["da_DK", "Dänisch (Dänemark)"]
+    ,["de", "Deutsch"]
+    ,["de_AT", "Deutsch (Österreich)"]
+    ,["de_CH", "Deutsch (Schweiz)"]
+    ,["de_DE", "Deutsch (Deutschland)"]
+    ,["de_GR", "Deutsch (Griechenland)"]
+    ,["de_LU", "Deutsch (Luxemburg)"]
+    ,["el", "Griechisch"]
+    ,["el_CY", "Griechisch (Zypern)"]
+    ,["el_GR", "Griechisch (Griechenland)"]
+    ,["en", "Englisch"]
+    ,["en_AU", "Englisch (Australien)"]
+    ,["en_CA", "Englisch (Kanada)"]
+    ,["en_GB", "Englisch (Vereinigtes Königreich)"]
+    ,["en_IE", "Englisch (Irland)"]
+    ,["en_IN", "Englisch (Indien)"]
+    ,["en_MT", "Englisch (Malta)"]
+    ,["en_NZ", "Englisch (Neuseeland)"]
+    ,["en_PH", "Englisch (Philippinen)"]
+    ,["en_SG", "Englisch (Singapur)"]
+    ,["en_US", "Englisch (Vereinigte Staaten von Amerika)"]
+    ,["en_ZA", "Englisch (Südafrika)"]
+    ,["es", "Spanisch"]
+    ,["es_AR", "Spanisch (Argentinien)"]
+    ,["es_BO", "Spanisch (Bolivien)"]
+    ,["es_CL", "Spanisch (Chile)"]
+    ,["es_CO", "Spanisch (Kolumbien)"]
+    ,["es_CR", "Spanisch (Costa Rica)"]
+    ,["es_CU", "Spanisch (Kuba)"]
+    ,["es_DO", "Spanisch (Dominikanische Republik)"]
+    ,["es_EC", "Spanisch (Ecuador)"]
+    ,["es_ES", "Spanisch (Spanien)"]
+    ,["es_GT", "Spanisch (Guatemala)"]
+    ,["es_HN", "Spanisch (Honduras)"]
+    ,["es_MX", "Spanisch (Mexiko)"]
+    ,["es_NI", "Spanisch (Nicaragua)"]
+    ,["es_PA", "Spanisch (Panama)"]
+    ,["es_PE", "Spanisch (Peru)"]
+    ,["es_PR", "Spanisch (Puerto Rico)"]
+    ,["es_PY", "Spanisch (Paraguay)"]
+    ,["es_SV", "Spanisch (El Salvador)"]
+    ,["es_US", "Spanisch (Vereinigte Staaten von Amerika)"]
+    ,["es_UY", "Spanisch (Uruguay)"]
+    ,["es_VE", "Spanisch (Venezuela)"]
+    ,["et", "Estnisch"]
+    ,["et_EE", "Estnisch (Estland)"]
+    ,["fi", "Finnisch"]
+    ,["fi_FI", "Finnisch (Finnland)"]
+    ,["fr", "Französisch"]
+    ,["fr_BE", "Französisch (Belgien)"]
+    ,["fr_CA", "Französisch (Kanada)"]
+    ,["fr_CH", "Französisch (Schweiz)"]
+    ,["fr_FR", "Französisch (Frankreich)"]
+    ,["fr_LU", "Französisch (Luxemburg)"]
+    ,["ga", "Irisch"]
+    ,["ga_IE", "Irisch (Irland)"]
+    ,["hi", "Hindi"]
+    ,["hi_IN", "Hindi (Indien)"]
+    ,["hr", "Kroatisch"]
+    ,["hr_HR", "Kroatisch (Kroatien)"]
+    ,["hu", "Ungarisch"]
+    ,["hu_HU", "Ungarisch (Ungarn)"]
+    ,["in", "Indonesisch"]
+    ,["in_ID", "Indonesisch (Indonesien)"]
+    ,["is", "Isländisch"]
+    ,["is_IS", "Isländisch (Island)"]
+    ,["it", "Italienisch"]
+    ,["it_CH", "Italienisch (Schweiz)"]
+    ,["it_IT", "Italienisch (Italien)"]
+    ,["iw", "Hebräisch"]
+    ,["iw_IL", "Hebräisch (Israel)"]
+    ,["ja", "Japanisch"]
+    ,["ja_JP", "Japanisch (Japan)"]
+    ,["ko", "Koreanisch"]
+    ,["ko_KR", "Koreanisch (Südkorea)"]
+    ,["lt", "Litauisch"]
+    ,["lt_LT", "Litauisch (Litauen)"]
+    ,["lv", "Lettisch"]
+    ,["lv_LV", "Lettisch (Lettland)"]
+    ,["mk", "Mazedonisch"]
+    ,["mk_MK", "Mazedonisch (Mazedonien)"]
+    ,["ms", "Malay"]
+    ,["ms_MY", "Malay (Malaysia)"]
+    ,["mt", "Maltesisch"]
+    ,["mt_MT", "Maltesisch (Malta)"]
+    ,["nl", "Niederländisch"]
+    ,["nl_BE", "Niederländisch (Belgien)"]
+    ,["nl_NL", "Niederländisch (Niederlande)"]
+    ,["no_NO", "Norwegisch (Norwegen,Nynorsk)"]
+    ,["pl", "Polnisch"]
+    ,["pl_PL", "Polnisch (Polen)"]
+    ,["pt", "Portugiesisch"]
+    ,["pt_BR", "Portugiesisch (Brasilien)"]
+    ,["pt_PT", "Portugiesisch (Portugal)"]
+    ,["ro", "Rumänisch"]
+    ,["ro_RO", "Rumänisch (Rumänien)"]
+    ,["ru", "Russisch"]
+    ,["ru_RU", "Russisch (Russland)"]
+    ,["sk", "Slowakisch"]
+    ,["sk_SK", "Slowakisch (Slowakei)"]
+    ,["sl", "Slowenisch"]
+    ,["sl_SI", "Slowenisch (Slowenien)"]
+    ,["sq", "Albanisch"]
+    ,["sq_AL", "Albanisch (Albanien)"]
+    ,["sr", "Serbisch"]
+    ,["sr_BA", "Serbisch (Bosnien und Herzegowina)"]
+    ,["sr_CS", "Serbisch (Serbien und Montenegro)"]
+    ,["sr_ME", "Serbisch (Montenegro)"]
+    ,["sr_RS", "Serbisch (Serbien)"]
+    ,["sv", "Schwedisch"]
+    ,["sv_SE", "Schwedisch (Schweden)"]
+    ,["th", "Thai"]
+    ,["th_TH", "Thai (Thailand)"]
+    ,["tr", "Türkisch"]
+    ,["tr_TR", "Türkisch (Türkei)"]
+    ,["uk", "Ukrainisch"]
+    ,["uk_UA", "Ukrainisch (Ukraine)"]
+    ,["vi", "Vietnamesisch"]
+    ,["vi_VN", "Vietnamesisch (Vietnam)"]
+    ,["zh", "Chinesisch"]
+    ,["zh_CN", "Chinesisch (China)"]
+    ,["zh_HK", "Chinesisch (Hongkong)"]
+    ,["zh_SG", "Chinesisch (Singapur)"]
+    ,["zh_TW", "Chinesisch (Taiwan)"]
+];
+
+result.object(languages);
\ No newline at end of file
diff --git a/entity/Org_entity/entityfields/status/possibleItemsProcess.js b/entity/Org_entity/entityfields/status/possibleItemsProcess.js
new file mode 100644
index 00000000000..b2808f8d322
--- /dev/null
+++ b/entity/Org_entity/entityfields/status/possibleItemsProcess.js
@@ -0,0 +1,9 @@
+import("system.result");
+import("system.translate");
+
+var types = [
+     ["0", translate.text("active")]
+    ,["1", translate.text("inactive")]
+];
+
+result.object(types);
\ No newline at end of file
diff --git a/entity/Org_entity/entityfields/type/possibleItemsProcess.js b/entity/Org_entity/entityfields/type/possibleItemsProcess.js
new file mode 100644
index 00000000000..974a2fdac2d
--- /dev/null
+++ b/entity/Org_entity/entityfields/type/possibleItemsProcess.js
@@ -0,0 +1,6 @@
+import("system.result");
+import("system.translate");
+result.object([
+     ["0", translate.text("Customer")]
+    ,["1", translate.text("Prospect")]
+])
\ No newline at end of file
diff --git a/entity/Org_entity/fromClauseProcess.js b/entity/Org_entity/fromClauseProcess.js
new file mode 100644
index 00000000000..3ed7fe56286
--- /dev/null
+++ b/entity/Org_entity/fromClauseProcess.js
@@ -0,0 +1,3 @@
+import("system.result");
+
+result.string("ORG join RELATION on (ORG.ORGID = RELATION.ORG_ID)");
\ No newline at end of file
diff --git a/language/_____LANGUAGE_de/_____LANGUAGE_de.aod b/language/_____LANGUAGE_de/_____LANGUAGE_de.aod
index d8b0459c6bd..4bc1d286d2d 100644
--- a/language/_____LANGUAGE_de/_____LANGUAGE_de.aod
+++ b/language/_____LANGUAGE_de/_____LANGUAGE_de.aod
@@ -7,8 +7,48 @@
   <variant></variant>
   <keyValueMap>
     <entry>
-      <key>?</key>
-      <value>?</value>
+      <key>Status</key>
+      <value>Status</value>
+    </entry>
+    <entry>
+      <key>Type</key>
+      <value>Typ</value>
+    </entry>
+    <entry>
+      <key>Language</key>
+      <value>Sprache</value>
+    </entry>
+    <entry>
+      <key>Customercode</key>
+      <value>Kundennummer</value>
+    </entry>
+    <entry>
+      <key>Information</key>
+      <value>Information</value>
+    </entry>
+    <entry>
+      <key>Name</key>
+      <value>Name</value>
+    </entry>
+    <entry>
+      <key>inactive</key>
+      <value>inaktiv</value>
+    </entry>
+    <entry>
+      <key>active</key>
+      <value>aktiv</value>
+    </entry>
+    <entry>
+      <key>Customer</key>
+      <value>Kunde</value>
+    </entry>
+    <entry>
+      <key>Prospect</key>
+      <value>potentieller Kunde</value>
+    </entry>
+    <entry>
+      <key>Contactmanagement</key>
+      <value>Kontakte</value>
     </entry>
   </keyValueMap>
 </language>
diff --git a/neonContext/Org_context/Org_context.aod b/neonContext/Org_context/Org_context.aod
new file mode 100644
index 00000000000..7356523e514
--- /dev/null
+++ b/neonContext/Org_context/Org_context.aod
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<neonContext xmlns="http://www.adito.de/2018/ao/Model" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" VERSION="1.0.0" xsi:schemaLocation="http://www.adito.de/2018/ao/Model adito://models/xsd/neonContext/1.0.0">
+  <name>Org_context</name>
+  <title>Company</title>
+  <majorModelMode>DISTRIBUTED</majorModelMode>
+  <icon>VAADIN:BUILDING</icon>
+  <mainview>OrgDetailed_view</mainview>
+  <filterview>OrgList_view</filterview>
+  <preview>OrgBasic_view</preview>
+  <entity>Org_entity</entity>
+  <references>
+    <neonViewReference>
+      <name>c71a570c-2408-474d-961a-7409d0999fde</name>
+      <view>OrgList_view</view>
+    </neonViewReference>
+    <neonViewReference>
+      <name>167b9623-4050-480a-811c-9824549d3834</name>
+      <view>OrgBasic_view</view>
+    </neonViewReference>
+    <neonViewReference>
+      <name>42b328d7-e3f2-4bab-bca8-6899d89df78d</name>
+      <view>OrgDetailed_view</view>
+    </neonViewReference>
+  </references>
+</neonContext>
diff --git a/neonView/OrgBasic_view/OrgBasic_view.aod b/neonView/OrgBasic_view/OrgBasic_view.aod
new file mode 100644
index 00000000000..991f27b2f13
--- /dev/null
+++ b/neonView/OrgBasic_view/OrgBasic_view.aod
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<neonView xmlns="http://www.adito.de/2018/ao/Model" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" VERSION="1.0.0" xsi:schemaLocation="http://www.adito.de/2018/ao/Model adito://models/xsd/neonView/1.0.0">
+  <name>OrgBasic_view</name>
+  <majorModelMode>DISTRIBUTED</majorModelMode>
+  <layout>
+    <boxLayout>
+      <name>layout</name>
+    </boxLayout>
+  </layout>
+  <children>
+    <cardViewTemplate>
+      <name>BasicCard_template</name>
+      <titleField>NAME</titleField>
+      <descriptionField>CUSTOMERCODE</descriptionField>
+      <entityField>#ENTITY</entityField>
+    </cardViewTemplate>
+    <titledListViewTemplate>
+      <name>DetailedData_template</name>
+      <entityField>#ENTITY</entityField>
+      <columns>
+        <neonTableColumn>
+          <name>bd288524-b70b-4cf3-bd31-2aa8fdfca2f7</name>
+          <entityField>LANGUAGE</entityField>
+        </neonTableColumn>
+        <neonTableColumn>
+          <name>8e8b125d-410d-4ce0-a383-11aa507d8c04</name>
+          <entityField>STATUS</entityField>
+        </neonTableColumn>
+      </columns>
+    </titledListViewTemplate>
+  </children>
+</neonView>
diff --git a/neonView/OrgDetailed_view/OrgDetailed_view.aod b/neonView/OrgDetailed_view/OrgDetailed_view.aod
new file mode 100644
index 00000000000..b7d58cb02b0
--- /dev/null
+++ b/neonView/OrgDetailed_view/OrgDetailed_view.aod
@@ -0,0 +1,41 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<neonView xmlns="http://www.adito.de/2018/ao/Model" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" VERSION="1.0.0" xsi:schemaLocation="http://www.adito.de/2018/ao/Model adito://models/xsd/neonView/1.0.0">
+  <name>OrgDetailed_view</name>
+  <title></title>
+  <majorModelMode>DISTRIBUTED</majorModelMode>
+  <layout>
+    <masterSlaveLayout>
+      <name>layout</name>
+      <master>b29471bb-a6d0-4730-90ef-191f76756fcb</master>
+    </masterSlaveLayout>
+  </layout>
+  <children>
+    <neonViewReference>
+      <name>b29471bb-a6d0-4730-90ef-191f76756fcb</name>
+      <entityField>#ENTITY</entityField>
+      <view>OrgBasic_view</view>
+    </neonViewReference>
+    <tableViewTemplate>
+      <name>OrgDetail_template</name>
+      <entityField>#ENTITY</entityField>
+      <columns>
+        <neonTableColumn>
+          <name>5515d98b-1b2b-411e-bc0e-962c1baeec4b</name>
+          <entityField>TYPE</entityField>
+        </neonTableColumn>
+        <neonTableColumn>
+          <name>cbdc051a-fca7-4821-af2e-ca91f944864e</name>
+          <entityField>LANGUAGE</entityField>
+        </neonTableColumn>
+        <neonTableColumn>
+          <name>3dc98a9b-0d10-41d1-92ad-7dfdb2774abc</name>
+          <entityField>STATUS</entityField>
+        </neonTableColumn>
+        <neonTableColumn>
+          <name>6c0e2cba-708c-4a99-b328-7102fa213b97</name>
+          <entityField>INFO</entityField>
+        </neonTableColumn>
+      </columns>
+    </tableViewTemplate>
+  </children>
+</neonView>
diff --git a/neonView/OrgList_view/OrgList_view.aod b/neonView/OrgList_view/OrgList_view.aod
new file mode 100644
index 00000000000..626f820e243
--- /dev/null
+++ b/neonView/OrgList_view/OrgList_view.aod
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<neonView xmlns="http://www.adito.de/2018/ao/Model" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" VERSION="1.0.0" xsi:schemaLocation="http://www.adito.de/2018/ao/Model adito://models/xsd/neonView/1.0.0">
+  <name>OrgList_view</name>
+  <majorModelMode>DISTRIBUTED</majorModelMode>
+  <layout>
+    <boxLayout>
+      <name>layout</name>
+    </boxLayout>
+  </layout>
+  <children>
+    <tableViewTemplate>
+      <name>Table_template</name>
+      <entityField>#ENTITY</entityField>
+      <columns>
+        <neonTableColumn>
+          <name>f94d2ffe-4fa7-489b-9e94-08f15dbd0a41</name>
+          <entityField>CUSTOMERCODE</entityField>
+          <expandRatio v="100" />
+        </neonTableColumn>
+        <neonTableColumn>
+          <name>a290a2ca-3236-4eb0-bf51-99f99d8414d6</name>
+          <entityField>NAME</entityField>
+        </neonTableColumn>
+        <neonTableColumn>
+          <name>b09730e2-5d7d-4b88-aeb9-45fbea6e86c1</name>
+          <entityField>LANGUAGE</entityField>
+        </neonTableColumn>
+        <neonTableColumn>
+          <name>1908e7ac-9e6a-4104-9d5b-da60a10a1c02</name>
+          <entityField>STATUS</entityField>
+        </neonTableColumn>
+      </columns>
+    </tableViewTemplate>
+  </children>
+</neonView>
diff --git a/others/db_changes/data/example_org.xml b/others/db_changes/data/example_org.xml
new file mode 100644
index 00000000000..f7cb549ee33
--- /dev/null
+++ b/others/db_changes/data/example_org.xml
@@ -0,0 +1,38 @@
+<?xml version="1.1" encoding="UTF-8" standalone="no"?>
+<databaseChangeLog xmlns="http://www.liquibase.org/xml/ns/dbchangelog" xmlns:ext="http://www.liquibase.org/xml/ns/dbchangelog-ext" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog-ext http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-ext.xsd http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.6.xsd">
+    <changeSet author="j.goderbauer" id="1528875814543-1">
+        <insert tableName="ORG">
+            <column name="ORGID" value="198b8a8b-c053-447a-bc69-17965b6a60ae"/>
+            <column name="USER_NEW" value="Gwendoline"/>
+            <column name="DATE_NEW" valueDate="2018-06-13T09:03:43"/>
+            <column name="NAME" value="Bitfox Ltd."/>
+            <column name="CUSTOMERCODE" value="01189998819991197253"/>
+            <column name="TYPE" valueNumeric="0"/>
+        </insert>
+        <insert tableName="RELATION">
+            <column name="RELATIONID" value="a589b58a-f120-42d8-9a64-0b176501eac7"/>
+            <column name="USER_NEW" value="Gwendoline"/>
+            <column name="DATE_NEW" valueDate="2018-06-13T09:03:43"/>
+            <column name="ORG_ID" value="198b8a8b-c053-447a-bc69-17965b6a60ae"/>
+            <column name="LANGUAGE" value="en_GB"/>
+            <column name="STATUS" valueNumeric="0"/>
+        </insert>
+    </changeSet>
+    <changeSet author="j.goderbauer" id="1528875814543-2">
+        <insert tableName="ORG">
+            <column name="ORGID" value="29990305-4ac6-4876-94b9-0300ce5cefaa"/>
+            <column name="USER_NEW" value="Gwendoline"/>
+            <column name="DATE_NEW" valueDate="2018-06-13T14:02:53"/>
+            <column name="NAME" value="Brød og mer &#x16D7; AS"/>
+            <column name="TYPE" valueNumeric="0"/>
+        </insert>
+        <insert tableName="RELATION">
+            <column name="RELATIONID" value="bdb6e38a-b227-455b-ae48-f8febd622e03"/>
+            <column name="USER_NEW" value="Gwendoline"/>
+            <column name="DATE_NEW" valueDate="2018-06-13T14:02:54"/>
+            <column name="ORG_ID" value="29990305-4ac6-4876-94b9-0300ce5cefaa"/>
+            <column name="LANGUAGE" value="no_NO"/>
+            <column name="STATUS" valueNumeric="0"/>
+        </insert>
+    </changeSet>
+</databaseChangeLog>
\ No newline at end of file
diff --git a/others/db_changes/masterChangelog.xml b/others/db_changes/masterChangelog.xml
index 55444430fcc..069d35c56b8 100644
--- a/others/db_changes/masterChangelog.xml
+++ b/others/db_changes/masterChangelog.xml
@@ -1,4 +1,5 @@
 <?xml version="1.1" encoding="UTF-8" standalone="no"?>
 <databaseChangeLog xmlns="http://www.liquibase.org/xml/ns/dbchangelog" xmlns:ext="http://www.liquibase.org/xml/ns/dbchangelog-ext" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog-ext http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-ext.xsd http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.6.xsd">
-    
+    <include file="struct/create_org.xml"/>
+    <include file="data/example_org.xml"/>
 </databaseChangeLog>
\ No newline at end of file
diff --git a/others/db_changes/struct/create_org.xml b/others/db_changes/struct/create_org.xml
new file mode 100644
index 00000000000..ae2a69496b5
--- /dev/null
+++ b/others/db_changes/struct/create_org.xml
@@ -0,0 +1,40 @@
+<?xml version="1.1" encoding="UTF-8" standalone="no"?>
+<databaseChangeLog xmlns="http://www.liquibase.org/xml/ns/dbchangelog" xmlns:ext="http://www.liquibase.org/xml/ns/dbchangelog-ext" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog-ext http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-ext.xsd http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.6.xsd">
+    <changeSet author="j.goderbauer" id="1528803466364-1">
+        <createTable tableName="ORG">
+            <column name="NAME" type="NVARCHAR(255)"/>
+            <column name="INFO" type="NCLOB"/>
+            <column name="TYPE" type="SMALLINT"/>
+            <column name="CUSTOMERCODE" type="VARCHAR(30)"/>
+            <column name="ORGID" type="CHAR(36)">
+                <constraints primaryKey="true" primaryKeyName="PK_ORG_ORGID"/>
+            </column>
+            <column name="USER_NEW" type="VARCHAR(50)">
+                <constraints nullable="false"/>
+            </column>
+            <column name="USER_EDIT" type="VARCHAR(50)"/>
+            <column name="DATE_NEW" type="TIMESTAMP">
+                <constraints nullable="false"/>
+            </column>
+            <column name="DATE_EDIT" type="TIMESTAMP"/>
+        </createTable>
+        <createTable tableName="RELATION">
+            <column name="STATUS" type="SMALLINT"/>
+            <column name="LANGUAGE" type="CHAR(5)"/>
+            <column name="ORG_ID" type="CHAR(36)">
+                <constraints nullable="false" foreignKeyName="FK_RELATION_ORG_ID" references="ORG(ORGID)"/>
+            </column>
+            <column name="RELATIONID" type="CHAR(36)">
+                <constraints primaryKey="true" primaryKeyName="PK_RELATION_RELATIONID"/>
+            </column>
+            <column name="USER_NEW" type="VARCHAR(50)">
+                <constraints nullable="false"/>
+            </column>
+            <column name="USER_EDIT" type="VARCHAR(50)"/>
+            <column name="DATE_NEW" type="TIMESTAMP">
+                <constraints nullable="false"/>
+            </column>
+            <column name="DATE_EDIT" type="TIMESTAMP"/>
+        </createTable>
+    </changeSet>
+</databaseChangeLog>
\ No newline at end of file
-- 
GitLab