diff --git a/entity/Communication_entity/Communication_entity.aod b/entity/Communication_entity/Communication_entity.aod index fa0187084e458d0756e6a7f8402b4504bba23bb5..1e27e281e8c4625e4bc7463a375f70e956b710f4 100644 --- a/entity/Communication_entity/Communication_entity.aod +++ b/entity/Communication_entity/Communication_entity.aod @@ -27,6 +27,7 @@ <consumer>KeywordMediums</consumer> <mandatory v="true" /> <displayValueProcess>%aditoprj%/entity/Communication_entity/entityfields/medium_id/displayValueProcess.js</displayValueProcess> + <onValueChange>%aditoprj%/entity/Communication_entity/entityfields/medium_id/onValueChange.js</onValueChange> </entityField> <entityField> <name>CONTACT_ID</name> diff --git a/entity/Communication_entity/entityfields/medium_id/onValueChange.js b/entity/Communication_entity/entityfields/medium_id/onValueChange.js new file mode 100644 index 0000000000000000000000000000000000000000..83357319d7dfea8b1caef304da0a9d7e81ed28c3 --- /dev/null +++ b/entity/Communication_entity/entityfields/medium_id/onValueChange.js @@ -0,0 +1,7 @@ +import("system.neon"); +import("system.vars"); + +var recordstate = vars.get("$sys.recordstate"); +if (recordstate == neon.OPERATINGSTATE_NEW || recordstate == neon.OPERATINGSTATE_EDIT) { + neon.setFieldValue("$field.ADDR", null); +}