From d2f324eed1a768f40a0434a562417dd191a52771 Mon Sep 17 00:00:00 2001
From: Johannes Hoermann <j.hoermann@adito.de>
Date: Tue, 20 Aug 2019 13:04:08 +0200
Subject: [PATCH] order: reset objectrowid on contact_id change

---
 .../Order_entity/entityfields/contact_id/onValueChange.js  | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/entity/Order_entity/entityfields/contact_id/onValueChange.js b/entity/Order_entity/entityfields/contact_id/onValueChange.js
index 90bde5ed09..a65930ffa6 100644
--- a/entity/Order_entity/entityfields/contact_id/onValueChange.js
+++ b/entity/Order_entity/entityfields/contact_id/onValueChange.js
@@ -1,3 +1,4 @@
+import("system.neon");
 import("system.vars");
 import("system.db");
 import("Util_lib");
@@ -8,5 +9,7 @@ if(contactid != "")
 {
     var relData = db.array(db.ROW, "select ISOLANGUAGE from CONTACT where CONTACTID = '" + contactid + "'");
     
-    if(relData[0] != "")    vars.set("$field.ISOLANGUAGE", relData[0]);
-}
\ No newline at end of file
+    if(relData[0] != "")   
+        vars.set("$field.ISOLANGUAGE", relData[0]);
+}
+neon.setFieldValue("$field.OBJECT_ROWID", null)
\ No newline at end of file
-- 
GitLab