diff --git a/entity/Offer_entity/Offer_entity.aod b/entity/Offer_entity/Offer_entity.aod
index 9cc12f720221706a63168933678366a516c9167a..225ae53b1006ccd6e607a55f97fd37fdc67719a7 100644
--- a/entity/Offer_entity/Offer_entity.aod
+++ b/entity/Offer_entity/Offer_entity.aod
@@ -73,7 +73,7 @@
       <name>SALESPROJECT_ID</name>
       <title>Salesproject</title>
       <linkedContext>Salesproject_context</linkedContext>
-      <mandatory v="true" />
+      <mandatoryProcess>%aditoprj%/entity/Offer_entity/entityfields/salesproject_id/mandatoryProcess.js</mandatoryProcess>
       <outgoingField>OfferSalesproject_dfo</outgoingField>
       <state>INVISIBLE</state>
       <stateProcess>%aditoprj%/entity/Offer_entity/entityfields/salesproject_id/stateProcess.js</stateProcess>
@@ -254,6 +254,7 @@
     <entityField>
       <name>RELATION_ORG_ID</name>
       <searchable v="false" />
+      <valueProcess>%aditoprj%/entity/Offer_entity/entityfields/relation_org_id/valueProcess.js</valueProcess>
     </entityField>
     <entityField>
       <name>RELATION_PERS_ID</name>
diff --git a/entity/Offer_entity/entityfields/relation_org_id/valueProcess.js b/entity/Offer_entity/entityfields/relation_org_id/valueProcess.js
new file mode 100644
index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
diff --git a/entity/Offer_entity/entityfields/salesproject_id/mandatoryProcess.js b/entity/Offer_entity/entityfields/salesproject_id/mandatoryProcess.js
new file mode 100644
index 0000000000000000000000000000000000000000..55c7c33b4f1bd15f6744b7898672d62723e99106
--- /dev/null
+++ b/entity/Offer_entity/entityfields/salesproject_id/mandatoryProcess.js
@@ -0,0 +1,9 @@
+import("system.vars");
+import("system.result");
+import("Relation_lib");
+
+var type = RelationUtils.getRelationType(vars.get("$field.RELATION_ID"), vars.get("$field.RELATION_PERS_ID"), vars.get("$field.RELATION_ORG_ID"));
+
+result.string(type != 2);
+
+
diff --git a/entity/Offeritem_entity/recordcontainers/db/onDBInsert.js b/entity/Offeritem_entity/recordcontainers/db/onDBInsert.js
index 33f35dd3c95aca115048ab046723af2d0ef049ed..2b35ec3e2b15707bb4691928c56b0d8ab569a3d4 100644
--- a/entity/Offeritem_entity/recordcontainers/db/onDBInsert.js
+++ b/entity/Offeritem_entity/recordcontainers/db/onDBInsert.js
@@ -23,5 +23,4 @@ if(oid != "")
 
     db.updateData("OFFER", cols, null, vals, SqlCondition.equals("OFFER.OFFERID", oid, "1 = 2"));
     
-    neon.refresh();
 }
\ No newline at end of file
diff --git a/entity/Relation_entity/entityfields/relationtype/valueProcess.js b/entity/Relation_entity/entityfields/relationtype/valueProcess.js
index d7e96ebf1347ad6eb152a15c0072fd68dc149c19..fe76276e3d1fbf0db17bbe87fe2cf9cdab05d456 100644
--- a/entity/Relation_entity/entityfields/relationtype/valueProcess.js
+++ b/entity/Relation_entity/entityfields/relationtype/valueProcess.js
@@ -2,4 +2,4 @@ import("system.result");
 import("system.vars");
 import("Relation_lib")
 
-result.object(RelationUtils.getRelationTypeByPersOrg(vars.get("$field.PERS_ID"), vars.get("$field.ORG_ID")));
\ No newline at end of file
+result.object(RelationUtils.getRelationType(vars.get("$field.RELATIONID"), vars.get("$field.PERS_ID"), vars.get("$field.ORG_ID")));
\ No newline at end of file
diff --git a/process/Relation_lib/process.js b/process/Relation_lib/process.js
index dc3610977d1b5c2f68bca03c6c55b654c9d906a8..e3dac3e9360959c422e934ec837b82823c9c6c42 100644
--- a/process/Relation_lib/process.js
+++ b/process/Relation_lib/process.js
@@ -1,3 +1,4 @@
+import("system.neon");
 import("system.vars");
 import("system.result");
 import("system.db");
@@ -12,6 +13,43 @@ import("Context_lib");
  */
 function RelationUtils() {}
 
+/**
+ * Get the type of relation. <br>
+ * In recordstate NEW or EDIT it loads the pers- / orgid from the db.<br>
+ * But in the other states it uses the values pPersId, pOrgId directly (for performance).<br>
+ * <br>
+ * It only checks if pPersId / pOrgId are not empty. <br>
+ * Based on which parameter is empty / not empty it return s the type of the relation. <br>
+ *  <br>
+ * !!It does not check if the pers / org ids really exist!! <br>
+ * !!And it does not check if really any relation with this pers / org ids exist!! <br>
+ *  <br>
+ *  <br>
+ * It is meant to be used by entitys, where you can load pers and org with the DataRecord. <br>
+ * This saves an extra select from RELATION. <br>
+ *  <br>
+ *  <br>
+ * @param {String} pRelationId
+ * @param {String} pPersId selected from the RELATION table
+ * @param {String} pOrgId selected from the RELATION table
+ *  <br>
+ * @return {Integer} <br>0 if both ids are empty <br>
+ *                      1 if organisation <br>
+ *                      2 if privat person <br>
+ *                      3 if person of an organisation <br>
+ */
+RelationUtils.getRelationType = function(pRelationId, pPersId, pOrgId)
+{
+    if (vars.get("$sys.recordstate") == neon.OPERATINGSTATE_NEW || vars.get("$sys.recordstate") == neon.OPERATINGSTATE_EDIT)
+    {
+        return RelationUtils.getRelationTypeByRelation(pRelationId);
+    }
+    else
+    {
+        return RelationUtils.getRelationTypeByPersOrg(pPersId, pOrgId);
+    }
+}
+
 /**
  * get the type of relation for a relationId <br>
  * If you already have persId and orgId from the RELATION table, use getRelationTypeByPersOrg() <br>