diff --git a/entity/Contact_entity/Contact_entity.aod b/entity/Contact_entity/Contact_entity.aod index d70d8d0861ddb402b8eb3e22bedb8a9045f04bdf..97b6330b429cf6f3ab3e99cc247ee0803dfa0314 100644 --- a/entity/Contact_entity/Contact_entity.aod +++ b/entity/Contact_entity/Contact_entity.aod @@ -28,6 +28,7 @@ <title>Company</title> <consumer>Organisations</consumer> <mandatory v="false" /> + <displayValueProcess>%aditoprj%/entity/Contact_entity/entityfields/organisation_id/displayValueProcess.js</displayValueProcess> <onValidation>%aditoprj%/entity/Contact_entity/entityfields/organisation_id/onValidation.js</onValidation> </entityField> <entityField> @@ -64,9 +65,6 @@ <fieldName>WithPersonIdFilter</fieldName> </dependency> <children> - <entityParameter> - <name>WithPrivate_param</name> - </entityParameter> <entityParameter> <name>ExcludeOrganisationsByPersonId</name> <valueProcess>%aditoprj%/entity/Contact_entity/entityfields/organisations/children/excludeorganisationsbypersonid/valueProcess.js</valueProcess> @@ -299,6 +297,10 @@ <name>DATE_EDIT.value</name> <recordfield>CONTACT.DATE_EDIT</recordfield> </dbRecordFieldMapping> + <dbRecordFieldMapping> + <name>ORGANISATION_ID.displayValue</name> + <recordfield>ORGANISATION.NAME</recordfield> + </dbRecordFieldMapping> </recordFieldMappings> </dbRecordContainer> </recordContainers> diff --git a/entity/Contact_entity/entityfields/organisation_id/displayValueProcess.js b/entity/Contact_entity/entityfields/organisation_id/displayValueProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..460b39849d5d34bac95e4b987d28a665b732e860 --- /dev/null +++ b/entity/Contact_entity/entityfields/organisation_id/displayValueProcess.js @@ -0,0 +1,9 @@ +import("system.result"); +import("system.db"); +import("system.vars"); +import("Contact_lib"); + +var organisationId = vars.get("$field.ORGANISATION_ID"); +var res = OrganisationUtils.getNameByOrganisationId(organisationId); + +result.string(res); \ No newline at end of file