From 0c8fc0b5e221d8087cc73b7bd1f83604c446d513 Mon Sep 17 00:00:00 2001 From: Johannes Hoermann <j.hoermann@adito.de> Date: Wed, 13 Feb 2019 10:39:18 +0100 Subject: [PATCH] object relation fixes --- entity/ActivityLink_entity/ActivityLink_entity.aod | 1 + entity/Activity_entity/Activity_entity.aod | 2 ++ entity/Appointment_entity/Appointment_entity.aod | 2 ++ entity/ObjectRelation_entity/ObjectRelation_entity.aod | 3 ++- .../entityfields/ab_objectrelationid/valueProcess.js | 7 +++++++ entity/Organisation_entity/Organisation_entity.aod | 2 ++ entity/Salesproject_entity/Salesproject_entity.aod | 2 ++ 7 files changed, 18 insertions(+), 1 deletion(-) create mode 100644 entity/ObjectRelation_entity/entityfields/ab_objectrelationid/valueProcess.js diff --git a/entity/ActivityLink_entity/ActivityLink_entity.aod b/entity/ActivityLink_entity/ActivityLink_entity.aod index c0e3074c27d..4b805447c3d 100644 --- a/entity/ActivityLink_entity/ActivityLink_entity.aod +++ b/entity/ActivityLink_entity/ActivityLink_entity.aod @@ -65,6 +65,7 @@ <entityParameter> <name>ObjectType_param</name> <code>%aditoprj%/entity/ActivityLink_entity/entityfields/objects/children/objecttype_param/code.js</code> + <triggerRecalculation v="true" /> </entityParameter> </children> </entityConsumer> diff --git a/entity/Activity_entity/Activity_entity.aod b/entity/Activity_entity/Activity_entity.aod index 93cbdb71e21..f22dc2b0ba9 100644 --- a/entity/Activity_entity/Activity_entity.aod +++ b/entity/Activity_entity/Activity_entity.aod @@ -164,10 +164,12 @@ <entityParameter> <name>Object1Rowid_param</name> <code>%aditoprj%/entity/Activity_entity/entityfields/objectrelations/children/object1rowid_param/code.js</code> + <triggerRecalculation v="true" /> </entityParameter> <entityParameter> <name>Object1Type_param</name> <code>%aditoprj%/entity/Activity_entity/entityfields/objectrelations/children/object1type_param/code.js</code> + <triggerRecalculation v="true" /> </entityParameter> </children> </entityConsumer> diff --git a/entity/Appointment_entity/Appointment_entity.aod b/entity/Appointment_entity/Appointment_entity.aod index 6fbc883175d..ec92d792572 100644 --- a/entity/Appointment_entity/Appointment_entity.aod +++ b/entity/Appointment_entity/Appointment_entity.aod @@ -143,11 +143,13 @@ <name>AnyObjectRowid_param</name> <code>%aditoprj%/entity/Appointment_entity/entityfields/objectrelations/children/anyobjectrowid_param/code.js</code> <expose v="true" /> + <triggerRecalculation v="true" /> <mandatory v="false" /> </entityParameter> <entityParameter> <name>AnyObjectType_param</name> <code>%aditoprj%/entity/Appointment_entity/entityfields/objectrelations/children/anyobjecttype_param/code.js</code> + <triggerRecalculation v="true" /> </entityParameter> </children> </entityConsumer> diff --git a/entity/ObjectRelation_entity/ObjectRelation_entity.aod b/entity/ObjectRelation_entity/ObjectRelation_entity.aod index e093dce1498..5aeb94ee24c 100644 --- a/entity/ObjectRelation_entity/ObjectRelation_entity.aod +++ b/entity/ObjectRelation_entity/ObjectRelation_entity.aod @@ -31,6 +31,7 @@ </entityField> <entityField> <name>AB_OBJECTRELATIONID</name> + <valueProcess>%aditoprj%/entity/ObjectRelation_entity/entityfields/ab_objectrelationid/valueProcess.js</valueProcess> </entityField> <entityField> <name>OBJECT2_ROWID</name> @@ -66,7 +67,7 @@ <recordContainer>db</recordContainer> <dependencies> <entityDependency> - <name>8eb3187c-07cb-4b51-8b7e-d63e83959bdb</name> + <name>637d4127-8eba-42e3-9857-a2869668f94c</name> <entityName>Activity_entity</entityName> <fieldName>ObjectRelations</fieldName> <isConsumer v="false" /> diff --git a/entity/ObjectRelation_entity/entityfields/ab_objectrelationid/valueProcess.js b/entity/ObjectRelation_entity/entityfields/ab_objectrelationid/valueProcess.js new file mode 100644 index 00000000000..f7637929676 --- /dev/null +++ b/entity/ObjectRelation_entity/entityfields/ab_objectrelationid/valueProcess.js @@ -0,0 +1,7 @@ +import("system.neon"); +import("system.util"); +import("system.vars"); +import("system.result"); + +if(vars.get("$sys.recordstate") == neon.OPERATINGSTATE_NEW) +result.string(util.getNewUUID()); \ No newline at end of file diff --git a/entity/Organisation_entity/Organisation_entity.aod b/entity/Organisation_entity/Organisation_entity.aod index 31e7d4c1945..cc6a517a19b 100644 --- a/entity/Organisation_entity/Organisation_entity.aod +++ b/entity/Organisation_entity/Organisation_entity.aod @@ -418,10 +418,12 @@ Usually this is used for filtering COMMUNICATION-entires by a specified contact <entityParameter> <name>AnyObjectRowid_param</name> <code>%aditoprj%/entity/Organisation_entity/entityfields/objectrelations/children/anyobjectrowid_param/code.js</code> + <triggerRecalculation v="true" /> </entityParameter> <entityParameter> <name>AnyObjectType_param</name> <code>%aditoprj%/entity/Organisation_entity/entityfields/objectrelations/children/anyobjecttype_param/code.js</code> + <triggerRecalculation v="true" /> </entityParameter> </children> </entityConsumer> diff --git a/entity/Salesproject_entity/Salesproject_entity.aod b/entity/Salesproject_entity/Salesproject_entity.aod index cfe29518749..11c7c80728b 100644 --- a/entity/Salesproject_entity/Salesproject_entity.aod +++ b/entity/Salesproject_entity/Salesproject_entity.aod @@ -296,10 +296,12 @@ <entityParameter> <name>AnyObjectRowid_param</name> <code>%aditoprj%/entity/Salesproject_entity/entityfields/objectrelations/children/anyobjectrowid_param/code.js</code> + <triggerRecalculation v="true" /> </entityParameter> <entityParameter> <name>AnyObjectType_param</name> <code>%aditoprj%/entity/Salesproject_entity/entityfields/objectrelations/children/anyobjecttype_param/code.js</code> + <triggerRecalculation v="true" /> </entityParameter> </children> </entityConsumer> -- GitLab