From 14a96e5fa937ebf680c39405bba2b484f922ed1c Mon Sep 17 00:00:00 2001 From: "f.maier" <f.maier@adito.de> Date: Fri, 22 Oct 2021 10:45:19 +0200 Subject: [PATCH] [Projekt: xRM-ContactManagement][TicketNr.: 2001648][Fehlerhafte Adress-Pflichtfeld-Validierung] --- entity/Address_entity/Address_entity.aod | 6 +++--- .../Address_entity/entityfields/address/mandatoryProcess.js | 6 ++++++ entity/Address_entity/entityfields/city/mandatoryProcess.js | 6 ++++++ entity/Address_entity/entityfields/zip/mandatoryProcess.js | 6 ++++++ 4 files changed, 21 insertions(+), 3 deletions(-) create mode 100644 entity/Address_entity/entityfields/address/mandatoryProcess.js create mode 100644 entity/Address_entity/entityfields/city/mandatoryProcess.js create mode 100644 entity/Address_entity/entityfields/zip/mandatoryProcess.js diff --git a/entity/Address_entity/Address_entity.aod b/entity/Address_entity/Address_entity.aod index 2eb879d491..1906e65437 100644 --- a/entity/Address_entity/Address_entity.aod +++ b/entity/Address_entity/Address_entity.aod @@ -13,7 +13,7 @@ <entityField> <name>ADDRESS</name> <title>Street</title> - <mandatory v="true" /> + <mandatoryProcess>%aditoprj%/entity/Address_entity/entityfields/address/mandatoryProcess.js</mandatoryProcess> <textInputAllowed v="false" /> <stateProcess>%aditoprj%/entity/Address_entity/entityfields/address/stateProcess.js</stateProcess> <titleProcess>%aditoprj%/entity/Address_entity/entityfields/address/titleProcess.js</titleProcess> @@ -58,7 +58,7 @@ <name>CITY</name> <documentation>%aditoprj%/entity/Address_entity/entityfields/city/documentation.adoc</documentation> <title>City</title> - <mandatory v="true" /> + <mandatoryProcess>%aditoprj%/entity/Address_entity/entityfields/city/mandatoryProcess.js</mandatoryProcess> <stateProcess>%aditoprj%/entity/Address_entity/entityfields/city/stateProcess.js</stateProcess> <onValueChange>%aditoprj%/entity/Address_entity/entityfields/city/onValueChange.js</onValueChange> <onValueChangeTypes> @@ -110,7 +110,7 @@ <entityField> <name>ZIP</name> <title>Postcode</title> - <mandatory v="true" /> + <mandatoryProcess>%aditoprj%/entity/Address_entity/entityfields/zip/mandatoryProcess.js</mandatoryProcess> <stateProcess>%aditoprj%/entity/Address_entity/entityfields/zip/stateProcess.js</stateProcess> <onValueChange>%aditoprj%/entity/Address_entity/entityfields/zip/onValueChange.js</onValueChange> <onValueChangeTypes> diff --git a/entity/Address_entity/entityfields/address/mandatoryProcess.js b/entity/Address_entity/entityfields/address/mandatoryProcess.js new file mode 100644 index 0000000000..132a366dcb --- /dev/null +++ b/entity/Address_entity/entityfields/address/mandatoryProcess.js @@ -0,0 +1,6 @@ +import("system.vars"); +import("Entity_lib"); +import("system.result"); +import("AddressEntity_lib"); + +result.object(AddressEntityValidation.isMandatoryField(vars.get("$field.COUNTRY"))); \ No newline at end of file diff --git a/entity/Address_entity/entityfields/city/mandatoryProcess.js b/entity/Address_entity/entityfields/city/mandatoryProcess.js new file mode 100644 index 0000000000..132a366dcb --- /dev/null +++ b/entity/Address_entity/entityfields/city/mandatoryProcess.js @@ -0,0 +1,6 @@ +import("system.vars"); +import("Entity_lib"); +import("system.result"); +import("AddressEntity_lib"); + +result.object(AddressEntityValidation.isMandatoryField(vars.get("$field.COUNTRY"))); \ No newline at end of file diff --git a/entity/Address_entity/entityfields/zip/mandatoryProcess.js b/entity/Address_entity/entityfields/zip/mandatoryProcess.js new file mode 100644 index 0000000000..132a366dcb --- /dev/null +++ b/entity/Address_entity/entityfields/zip/mandatoryProcess.js @@ -0,0 +1,6 @@ +import("system.vars"); +import("Entity_lib"); +import("system.result"); +import("AddressEntity_lib"); + +result.object(AddressEntityValidation.isMandatoryField(vars.get("$field.COUNTRY"))); \ No newline at end of file -- GitLab