diff --git a/entity/Offer_entity/Offer_entity.aod b/entity/Offer_entity/Offer_entity.aod index e9400dd1aa56744d0adfa5b7e64cbc24fe1c8629..6b9124e09feb5b319e4b8a78cfe57a295c81a0a6 100644 --- a/entity/Offer_entity/Offer_entity.aod +++ b/entity/Offer_entity/Offer_entity.aod @@ -199,6 +199,7 @@ <name>printOffer</name> <title>Print Offer</title> <onActionProcess>%aditoprj%/entity/Offer_entity/entityfields/printoffer/onActionProcess.js</onActionProcess> + <isMenuAction v="false" /> <iconId>VAADIN:FILE_TEXT_O</iconId> <stateProcess>%aditoprj%/entity/Offer_entity/entityfields/printoffer/stateProcess.js</stateProcess> </entityActionField> @@ -1085,6 +1086,10 @@ <name>CONTACT_PERSON_ID.displayValue</name> <expression>%aditoprj%/entity/Offer_entity/recordcontainers/db/recordfieldmappings/contact_person_id.displayvalue/expression.js</expression> </dbRecordFieldMapping> + <dbRecordFieldMapping> + <name>CONTACT_ID.displayValue</name> + <expression>%aditoprj%/entity/Offer_entity/recordcontainers/db/recordfieldmappings/contact_id.displayvalue/expression.js</expression> + </dbRecordFieldMapping> </recordFieldMappings> </dbRecordContainer> <indexRecordContainer> diff --git a/entity/Offer_entity/entityfields/contact_id/displayValueProcess.js b/entity/Offer_entity/entityfields/contact_id/displayValueProcess.js index d8f47a34a6c795199277bc1d2930775b4b29e253..85822946ab4fe0ba7730ca93fd6fca69250a5b33 100644 --- a/entity/Offer_entity/entityfields/contact_id/displayValueProcess.js +++ b/entity/Offer_entity/entityfields/contact_id/displayValueProcess.js @@ -1,7 +1,6 @@ -import("system.result"); -import("system.vars"); -import("Contact_lib"); -import("system.neon"); - - +import("system.result"); +import("system.vars"); +import("Contact_lib"); +import("system.neon"); + result.string(ContactUtils.getFullTitleByContactId(vars.getString("$field.CONTACT_ID"))); \ No newline at end of file diff --git a/entity/Offer_entity/entityfields/contact_id/linkedContextProcess.js b/entity/Offer_entity/entityfields/contact_id/linkedContextProcess.js index c6e221c7440633d683f94fcc2505ba548d581b1b..666b1349748541127d2977a28e6a140ccbf800b1 100644 --- a/entity/Offer_entity/entityfields/contact_id/linkedContextProcess.js +++ b/entity/Offer_entity/entityfields/contact_id/linkedContextProcess.js @@ -1,5 +1,5 @@ -import("system.vars"); -import("system.result"); -import("Contact_lib"); - -result.string(ContactUtils.getContextByContactId(vars.getString("$field.CONTACT_ID"))); \ No newline at end of file +import("system.vars"); +import("system.result"); +import("Contact_lib"); + +result.string(ContactUtils.getContextByPersOrg(vars.get("$field.CONTACT_PERSON_ID"), vars.get("$field.CONTACT_ORG_ID"))); \ No newline at end of file diff --git a/entity/Offer_entity/recordcontainers/db/recordfieldmappings/contact_id.displayvalue/expression.js b/entity/Offer_entity/recordcontainers/db/recordfieldmappings/contact_id.displayvalue/expression.js new file mode 100644 index 0000000000000000000000000000000000000000..2821fb702f86a860ad359c2ea089f5551743d795 --- /dev/null +++ b/entity/Offer_entity/recordcontainers/db/recordfieldmappings/contact_id.displayvalue/expression.js @@ -0,0 +1,7 @@ +import("system.vars"); +import("Contact_lib"); +import("system.result"); + +var contact = Contact.createWithColumnPreset() +var renderer = new ContactTitleRenderer(contact, ContactTitleRenderer.OPTIONS.IncludeOrganisation); +result.string(renderer.asSql()); \ No newline at end of file