diff --git a/entity/QuickEntry_entity/QuickEntry_entity.aod b/entity/QuickEntry_entity/QuickEntry_entity.aod index 3a754cdb58b33ee3c98c2e2e277719f675006c28..953caf69508224680bf2a3bdffb4979a672d95aa 100644 --- a/entity/QuickEntry_entity/QuickEntry_entity.aod +++ b/entity/QuickEntry_entity/QuickEntry_entity.aod @@ -67,10 +67,13 @@ <entityField> <name>FIRSTNAME</name> <title>Firstname</title> + <mandatoryProcess>%aditoprj%/entity/QuickEntry_entity/entityfields/firstname/mandatoryProcess.js</mandatoryProcess> </entityField> <entityField> <name>LASTNAME</name> <title>Lastname</title> + <mandatoryProcess>%aditoprj%/entity/QuickEntry_entity/entityfields/lastname/mandatoryProcess.js</mandatoryProcess> + <valueProcess>%aditoprj%/entity/QuickEntry_entity/entityfields/lastname/valueProcess.js</valueProcess> </entityField> <entityField> <name>PERSON_TITLE</name> @@ -81,6 +84,7 @@ <name>PERSON_SALUTATION</name> <title>Salutation</title> <consumer>Salutations</consumer> + <mandatoryProcess>%aditoprj%/entity/QuickEntry_entity/entityfields/person_salutation/mandatoryProcess.js</mandatoryProcess> </entityField> <entityField> <name>PERSON_CONTACT_ID</name> diff --git a/entity/QuickEntry_entity/entityfields/lastname/mandatoryProcess.js b/entity/QuickEntry_entity/entityfields/lastname/mandatoryProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..c5a419766d570f6091355c47f0362d476d2a4c71 --- /dev/null +++ b/entity/QuickEntry_entity/entityfields/lastname/mandatoryProcess.js @@ -0,0 +1,10 @@ +import("system.logging"); +import("system.result"); +import("system.vars"); + +var insertedRows = vars.get("$field.Adresses.insertedRows"); +var isInserted = insertedRows.some(function (row){ + return row["ZIP"] || row["CITY"] || row["ADDRESS"]; +}) + +result.string(isInserted); \ No newline at end of file diff --git a/entity/QuickEntry_entity/entityfields/person_salutation/mandatoryProcess.js b/entity/QuickEntry_entity/entityfields/person_salutation/mandatoryProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..c5a419766d570f6091355c47f0362d476d2a4c71 --- /dev/null +++ b/entity/QuickEntry_entity/entityfields/person_salutation/mandatoryProcess.js @@ -0,0 +1,10 @@ +import("system.logging"); +import("system.result"); +import("system.vars"); + +var insertedRows = vars.get("$field.Adresses.insertedRows"); +var isInserted = insertedRows.some(function (row){ + return row["ZIP"] || row["CITY"] || row["ADDRESS"]; +}) + +result.string(isInserted); \ No newline at end of file