diff --git a/entity/InterestLink_entity/InterestLink_entity.aod b/entity/InterestLink_entity/InterestLink_entity.aod index 6b13ef837bd71b412f22b21d446cc468373b757b..0110d444a8972a402073f6344ac80696da12a2d8 100644 --- a/entity/InterestLink_entity/InterestLink_entity.aod +++ b/entity/InterestLink_entity/InterestLink_entity.aod @@ -18,6 +18,7 @@ <title>Interest</title> <consumer>Interests</consumer> <displayValueProcess>%aditoprj%/entity/InterestLink_entity/entityfields/interest_id/displayValueProcess.js</displayValueProcess> + <onValidation>%aditoprj%/entity/InterestLink_entity/entityfields/interest_id/onValidation.js</onValidation> </entityField> <entityField> <name>INTERESTLINKID</name> @@ -87,10 +88,12 @@ <dbRecordFieldMapping> <name>INTEREST_ID.value</name> <recordfield>INTERESTLINK.INTEREST_ID</recordfield> + <expression>%aditoprj%/entity/InterestLink_entity/recordcontainers/db/recordfieldmappings/interest_id.value/expression.js</expression> </dbRecordFieldMapping> <dbRecordFieldMapping> <name>INTERESTLINKID.value</name> <recordfield>INTERESTLINK.INTERESTLINKID</recordfield> + <expression>%aditoprj%/entity/InterestLink_entity/recordcontainers/db/recordfieldmappings/interestlinkid.value/expression.js</expression> </dbRecordFieldMapping> <dbRecordFieldMapping> <name>STATUS.value</name> diff --git a/entity/InterestLink_entity/entityfields/interest_id/onValidation.js b/entity/InterestLink_entity/entityfields/interest_id/onValidation.js new file mode 100644 index 0000000000000000000000000000000000000000..834f73d13356a293cfafae324137a69c5f013b5a --- /dev/null +++ b/entity/InterestLink_entity/entityfields/interest_id/onValidation.js @@ -0,0 +1,17 @@ +import("system.translate"); +import("system.result"); +import("system.neon"); +import("system.vars"); +import("Sql_lib"); + +if (vars.get("$sys.operatingstate") == neon.OPERATINGSTATE_NEW && vars.get("$local.value") && vars.get("$field.CONTACT_ID")) +{ + var isParticipant= newSelect(["INTEREST_ID"]) + .from("INTERESTLINK") + .where("INTERESTLINK.INTEREST_ID", vars.get("$field.INTEREST_ID")) + .and("INTERESTLINK.CONTACT_ID",vars.get("$field.CONTACT_ID")) + .cell(); + if (isParticipant){ + result.string(translate.text("Interest already assign to contact")); + } +} \ No newline at end of file diff --git a/entity/Interest_entity/Interest_entity.aod b/entity/Interest_entity/Interest_entity.aod index 4dbed8e6bffb1e652677678218207d5df5eea875..dc9842429d585425c7f804d86729a550adb85010 100644 --- a/entity/Interest_entity/Interest_entity.aod +++ b/entity/Interest_entity/Interest_entity.aod @@ -60,6 +60,8 @@ <recordContainers> <dbRecordContainer> <name>db</name> + <conditionProcess>%aditoprj%/entity/Interest_entity/recordcontainers/db/conditionProcess.js</conditionProcess> + <orderClauseProcess>%aditoprj%/entity/Interest_entity/recordcontainers/db/orderClauseProcess.js</orderClauseProcess> <alias>Data_alias</alias> <recordFieldMappings> <dbRecordFieldMapping> diff --git a/entity/Interest_entity/recordcontainers/db/orderClauseProcess.js b/entity/Interest_entity/recordcontainers/db/orderClauseProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..8c6362877edd0f63bac79ad30a88a7169c68beb5 --- /dev/null +++ b/entity/Interest_entity/recordcontainers/db/orderClauseProcess.js @@ -0,0 +1,4 @@ +import("system.result"); +import("system.db"); + +result.object({"INTEREST.TITLE": db.ASCENDING}); \ No newline at end of file diff --git a/language/_____LANGUAGE_EXTRA/_____LANGUAGE_EXTRA.aod b/language/_____LANGUAGE_EXTRA/_____LANGUAGE_EXTRA.aod index 767f6addc3b9afdd7ef2474a5fd1b7ae5338ab5b..9b3fdee94ac7539588135d7fa968640c882a8cdc 100644 --- a/language/_____LANGUAGE_EXTRA/_____LANGUAGE_EXTRA.aod +++ b/language/_____LANGUAGE_EXTRA/_____LANGUAGE_EXTRA.aod @@ -9037,6 +9037,57 @@ <entry> <key>Turnover and Forecast</key> </entry> + <entry> + <key>The chosen attributes were successfully set for %0 %1</key> + </entry> + <entry> + <key>SerialLetter</key> + </entry> + <entry> + <key>Bulkmail</key> + </entry> + <entry> + <key>%0 recipient will be added to the serial letter.</key> + </entry> + <entry> + <key>The attribute \"%0\" couldn't be set for %1 %2, because %3.</key> + </entry> + <entry> + <key>the max amount of this attribute has been reached</key> + </entry> + <entry> + <key>set attribute (use filter result)</key> + </entry> + <entry> + <key>The chosen attribute was successfully set for %0 %1</key> + </entry> + <entry> + <key>Volume (Euro)</key> + </entry> + <entry> + <key>add Attributes</key> + </entry> + <entry> + <key>%0 recipient will be added to the bulk mail.</key> + </entry> + <entry> + <key>Attribute \"%0\" can only be inserted once with the same value.</key> + </entry> + <entry> + <key>Set attribute (use filter result)</key> + </entry> + <entry> + <key>set attribute (selected data)</key> + </entry> + <entry> + <key>affected rows:</key> + </entry> + <entry> + <key>this attribute with the same value exists already</key> + </entry> + <entry> + <key>Interest already asign to contact</key> + </entry> </keyValueMap> <font name="Dialog" style="0" size="11" /> <sqlModels> diff --git a/language/_____LANGUAGE_de/_____LANGUAGE_de.aod b/language/_____LANGUAGE_de/_____LANGUAGE_de.aod index 33eb0f9dde792cadfe57eb8d192bb77c307165d0..b4ccac2916e81fe684098d9614795226689c4ce8 100644 --- a/language/_____LANGUAGE_de/_____LANGUAGE_de.aod +++ b/language/_____LANGUAGE_de/_____LANGUAGE_de.aod @@ -6017,6 +6017,9 @@ <key>Privacy agreement</key> <value>Datenschutzabkommen</value> </entry> + <entry> + <key>Interest already asign to contact</key> + </entry> <entry> <key>Newsfeed (Preview)</key> <value>Newsfeed (Vorschau)</value> @@ -11889,6 +11892,9 @@ Bitte Datumseingabe prüfen</value> <entry> <key>Shows the organisations turnover and forecast</key> </entry> + <entry> + <key>set attribute (use filter result)</key> + </entry> </keyValueMap> <font name="Dialog" style="0" size="11" /> </language> diff --git a/language/_____LANGUAGE_en/_____LANGUAGE_en.aod b/language/_____LANGUAGE_en/_____LANGUAGE_en.aod index 743dd7e941a9d2c16f50b94e5b74ce4ad68ac291..904f7bccbcc3129c24aeb700eb0d6c1e4785e0d9 100644 --- a/language/_____LANGUAGE_en/_____LANGUAGE_en.aod +++ b/language/_____LANGUAGE_en/_____LANGUAGE_en.aod @@ -4086,6 +4086,10 @@ <entry> <key>[%0]it was necessary to create a file from a blob-field but no lob-file-path was specified.</key> </entry> + <entry> + <key>Interest already assign to contact</key> + <value>Interesse bereits mit Kontakt verknüpft</value> + </entry> <entry> <key>SqlUtils.getSqlInStatement: if pAsPrepared is true, pPreparedDbType has to be filld with the correct db type</key> </entry> @@ -9149,6 +9153,27 @@ <entry> <key>Turnover and Forecast</key> </entry> + <entry> + <key>SerialLetter</key> + </entry> + <entry> + <key>Bulkmail</key> + </entry> + <entry> + <key>%0 recipient will be added to the serial letter.</key> + </entry> + <entry> + <key>Volume (Euro)</key> + </entry> + <entry> + <key>%0 recipient will be added to the bulk mail.</key> + </entry> + <entry> + <key>Attribute \"%0\" can only be inserted once with the same value.</key> + </entry> + <entry> + <key>Set attribute (use filter result)</key> + </entry> </keyValueMap> <font name="Dialog" style="0" size="11" /> </language>