diff --git a/entity/Address_entity/Address_entity.aod b/entity/Address_entity/Address_entity.aod index 334ba18c6430270f1216494357448658421ed531..3feac2b6cffd866329fcf92285773851a8023e85 100644 --- a/entity/Address_entity/Address_entity.aod +++ b/entity/Address_entity/Address_entity.aod @@ -141,6 +141,10 @@ <name>DefaultAddressId_param</name> <expose v="true" /> </entityParameter> + <entityParameter> + <name>OrganisationId_param</name> + <expose v="false" /> + </entityParameter> </children> </entityProvider> <entityProvider> @@ -210,6 +214,12 @@ <fieldName>ContactAndOrganisationAddresses</fieldName> <isConsumer v="false" /> </entityDependency> + <entityDependency> + <name>daa41953-8e95-46f2-b08a-6c843ab87985</name> + <entityName>Offer_entity</entityName> + <fieldName>PossibleAddresses</fieldName> + <isConsumer v="false" /> + </entityDependency> </dependencies> <children> <entityParameter> diff --git a/entity/Offer_entity/Offer_entity.aod b/entity/Offer_entity/Offer_entity.aod index 64409fcaa96e4febbaefcdb69b0c7e95d83ee7d2..2e9ed00405539d833d2543e06e97da035aa94eba 100644 --- a/entity/Offer_entity/Offer_entity.aod +++ b/entity/Offer_entity/Offer_entity.aod @@ -357,7 +357,7 @@ <entityField> <name>ChosenAddress</name> <title>Choose address</title> - <possibleItemsProcess>%aditoprj%/entity/Offer_entity/entityfields/chosenaddress/possibleItemsProcess.js</possibleItemsProcess> + <consumer>PossibleAddresses</consumer> <stateProcess>%aditoprj%/entity/Offer_entity/entityfields/chosenaddress/stateProcess.js</stateProcess> <onValueChange>%aditoprj%/entity/Offer_entity/entityfields/chosenaddress/onValueChange.js</onValueChange> <onValueChangeTypes> @@ -700,6 +700,21 @@ <state>READONLY</state> <valueProcess>%aditoprj%/entity/Offer_entity/entityfields/fulloffercode/valueProcess.js</valueProcess> </entityField> + <entityConsumer> + <name>PossibleAddresses</name> + <fieldType>DEPENDENCY_OUT</fieldType> + <dependency> + <name>dependency</name> + <entityName>Address_entity</entityName> + <fieldName>OrganisationAndContactAddresses</fieldName> + </dependency> + <children> + <entityParameter> + <name>ContactId_param</name> + <valueProcess>%aditoprj%/entity/Offer_entity/entityfields/possibleaddresses/children/contactid_param/valueProcess.js</valueProcess> + </entityParameter> + </children> + </entityConsumer> </entityFields> <recordContainers> <dbRecordContainer> diff --git a/entity/Offer_entity/entityfields/chosenaddress/possibleItemsProcess.js b/entity/Offer_entity/entityfields/chosenaddress/possibleItemsProcess.js deleted file mode 100644 index c45999248fc3f0f12bfe2dcf4987b648fdf4a25a..0000000000000000000000000000000000000000 --- a/entity/Offer_entity/entityfields/chosenaddress/possibleItemsProcess.js +++ /dev/null @@ -1,5 +0,0 @@ -import("system.vars"); -import("system.result"); -import("PostalAddress_lib"); - -result.object(AddressUtils.getAllPossibleAddresses(vars.get("$field.CONTACT_ID"))); \ No newline at end of file diff --git a/entity/Offer_entity/entityfields/possibleaddresses/children/contactid_param/valueProcess.js b/entity/Offer_entity/entityfields/possibleaddresses/children/contactid_param/valueProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..7e0951d02b7c26bc9ff0a84ad34eb2b47aa0ced8 --- /dev/null +++ b/entity/Offer_entity/entityfields/possibleaddresses/children/contactid_param/valueProcess.js @@ -0,0 +1,4 @@ +import("system.result"); +import("system.vars"); + +result.string(vars.get("$field.CONTACT_ID")); \ No newline at end of file diff --git a/entity/Person_entity/Person_entity.aod b/entity/Person_entity/Person_entity.aod index 44bc063e4a6002562ea964b9dd9003dcd17d7ac2..10a779eccda87812dc704d3e938f517f72f5350d 100644 --- a/entity/Person_entity/Person_entity.aod +++ b/entity/Person_entity/Person_entity.aod @@ -698,10 +698,6 @@ Usually this is used for filtering COMMUNICATION-entries by a specified contact <name>ContactId_param</name> <valueProcess>%aditoprj%/entity/Person_entity/entityfields/contactandorganisationaddresses/children/contactid_param/valueProcess.js</valueProcess> </entityParameter> - <entityParameter> - <name>OrganisationId_param</name> - <valueProcess>%aditoprj%/entity/Person_entity/entityfields/contactandorganisationaddresses/children/organisationid_param/valueProcess.js</valueProcess> - </entityParameter> </children> </entityConsumer> <entityField> diff --git a/entity/Person_entity/entityfields/contactandorganisationaddresses/children/organisationid_param/valueProcess.js b/entity/Person_entity/entityfields/contactandorganisationaddresses/children/organisationid_param/valueProcess.js deleted file mode 100644 index a3b647281edc9773de45eec7b7d8afe949f3eba2..0000000000000000000000000000000000000000 --- a/entity/Person_entity/entityfields/contactandorganisationaddresses/children/organisationid_param/valueProcess.js +++ /dev/null @@ -1,4 +0,0 @@ -import("system.vars"); -import("system.result"); - -result.string(vars.get("$field.ORGANISATION_ID")); \ No newline at end of file