diff --git a/entity/Email_entity/Email_entity.aod b/entity/Email_entity/Email_entity.aod index 54ab0155b80eefbaf3ba3b1841a2d798cdf4f55c..f27af73fbb8f680a3ea4dad7752a71622a683a37 100644 --- a/entity/Email_entity/Email_entity.aod +++ b/entity/Email_entity/Email_entity.aod @@ -43,6 +43,7 @@ <textInputAllowed v="true" /> <valueProcess>%aditoprj%/entity/Email_entity/entityfields/recipient/valueProcess.js</valueProcess> <displayValueProcess>%aditoprj%/entity/Email_entity/entityfields/recipient/displayValueProcess.js</displayValueProcess> + <onValueChange>%aditoprj%/entity/Email_entity/entityfields/recipient/onValueChange.js</onValueChange> </entityField> <entityConsumer> <name>EmailAddresses</name> diff --git a/entity/Email_entity/entityfields/recipient/onValueChange.js b/entity/Email_entity/entityfields/recipient/onValueChange.js new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/entity/Email_entity/entityfields/recipient/valueProcess.js b/entity/Email_entity/entityfields/recipient/valueProcess.js index e83561d0e54fb7ff062c4157e4c6b6bd718f86b6..3ad60d78a7acdb319c06b3a1bf67e775f71a15d0 100644 --- a/entity/Email_entity/entityfields/recipient/valueProcess.js +++ b/entity/Email_entity/entityfields/recipient/valueProcess.js @@ -9,4 +9,8 @@ if (vars.get("$sys.recordstate") == neon.OPERATINGSTATE_NEW && vars.get("$this.v result.string(vars.get("$param.Recipient_param")); else if (vars.exists("$param.ContactId_param") && vars.get("$param.ContactId_param")) result.string(CommUtil.getStandardMail(vars.get("$param.ContactId_param"))); -} \ No newline at end of file +} +else if (vars.get("$sys.recordstate") == neon.OPERATINGSTATE_NEW && !vars.get("$field.RECIPIENT").includes("@")) + result.string(newSelect("ADDR") + .from("COMMUNICATION") + .where("COMMUNICATION.COMMUNICATIONID", vars.get("$this.value")).cell()); \ No newline at end of file