Skip to content
Snippets Groups Projects
Commit ff549a3c authored by Johannes Goderbauer's avatar Johannes Goderbauer
Browse files

Person: make salutation mandatory

parent 8ad58f71
No related branches found
No related tags found
No related merge requests found
......@@ -60,6 +60,7 @@
<name>SALUTATION</name>
<title>Salutation</title>
<consumer>Salutations</consumer>
<mandatory v="true" />
</entityField>
<entityField>
<name>TITLE</name>
......
......@@ -2,9 +2,14 @@ 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"];
})
var isMandatory = false;
if (vars.get("$field.LASTNAME") != "")
isMandatory = true;
else {
var insertedRows = vars.get("$field.Adresses.insertedRows");//this is the list of person contact addresses
isMandatory = insertedRows.some(function (row){
return row["ZIP"] || row["CITY"] || row["ADDRESS"];
});
}
result.string(isInserted);
\ No newline at end of file
result.string(isMandatory);
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment