diff --git a/entity/Contact_entity/Contact_entity.aod b/entity/Contact_entity/Contact_entity.aod index c758ccea00f22fa88427282584aebe24ec9795d2..95e026e4e1e3ead33a9a70576c4f820f699bf5bf 100644 --- a/entity/Contact_entity/Contact_entity.aod +++ b/entity/Contact_entity/Contact_entity.aod @@ -4,7 +4,7 @@ <title>Contact</title> <majorModelMode>DISTRIBUTED</majorModelMode> <documentation>%aditoprj%/entity/Contact_entity/documentation.adoc</documentation> - <icon>VAADIN:USERS</icon> + <iconId>VAADIN:USERS</iconId> <recordContainer>db</recordContainer> <entityFields> <entityProvider> @@ -18,6 +18,7 @@ <title>Organisation</title> <consumer>Organisations</consumer> <mandatory v="true" /> + <onValueChange>%aditoprj%/entity/Contact_entity/entityfields/organisation_id/onValueChange.js</onValueChange> </entityField> <entityField> <name>PERSON_ID</name> diff --git a/entity/Contact_entity/entityfields/organisation_id/onValueChange.js b/entity/Contact_entity/entityfields/organisation_id/onValueChange.js new file mode 100644 index 0000000000000000000000000000000000000000..0347a3d2d5b43d2b6be7a3464f03c5e61330828d --- /dev/null +++ b/entity/Contact_entity/entityfields/organisation_id/onValueChange.js @@ -0,0 +1,4 @@ +import("system.vars"); + +//since the standard address can be only values of org the standard address has to be reset on org change +vars.set("$field.ADDRESS_ID", ""); \ No newline at end of file