diff --git a/entity/Activity_entity/Activity_entity.aod b/entity/Activity_entity/Activity_entity.aod index 08af2bf5706a87ab3197f78d2934e59620172a60..ef824839da69ef485f55dd96252e6dd559d2f448 100644 --- a/entity/Activity_entity/Activity_entity.aod +++ b/entity/Activity_entity/Activity_entity.aod @@ -630,11 +630,10 @@ </entityActionField> <entityActionField> <name>addAttributeToSelection</name> - <title>Set attribute (use filter result)</title> + <title>Set attribute</title> <onActionProcess>%aditoprj%/entity/Activity_entity/entityfields/filteractions/children/addattributetoselection/onActionProcess.js</onActionProcess> <isObjectAction v="false" /> <iconId>VAADIN:TAGS</iconId> - <titleProcess>%aditoprj%/entity/Activity_entity/entityfields/filteractions/children/addattributetoselection/titleProcess.js</titleProcess> </entityActionField> </children> </entityActionGroup> diff --git a/entity/Activity_entity/entityfields/filteractions/children/addattributetoselection/onActionProcess.js b/entity/Activity_entity/entityfields/filteractions/children/addattributetoselection/onActionProcess.js index 7f18e32eb51f3d1d6e33f1f00f8b8526adb4710e..b8483b3040b6ce7a67904b7d8503dfafc3510f22 100644 --- a/entity/Activity_entity/entityfields/filteractions/children/addattributetoselection/onActionProcess.js +++ b/entity/Activity_entity/entityfields/filteractions/children/addattributetoselection/onActionProcess.js @@ -1,3 +1,4 @@ +import("system.neonFilter"); import("system.translate"); import("system.neon"); import("Context_lib"); @@ -23,4 +24,5 @@ var params = { "ContextTitlePlural_param": translate.text("Activities") } -neon.openContext("AddAttributesToSelection", "AddAttributesToSelectionEdit_view", null, neon.OPERATINGSTATE_NEW, params, null); \ No newline at end of file +var recipe = neonFilter.createEntityRecordsRecipeBuilder().parameters(params).toString(); +neon.openContextWithRecipe("AddAttributesToSelection", "AddAttributesToSelectionEdit_view", recipe, neon.OPERATINGSTATE_NEW); diff --git a/entity/Activity_entity/entityfields/filteractions/children/addattributetoselection/titleProcess.js b/entity/Activity_entity/entityfields/filteractions/children/addattributetoselection/titleProcess.js deleted file mode 100644 index f5b266e73f872e682e54a918083f14883f9dc415..0000000000000000000000000000000000000000 --- a/entity/Activity_entity/entityfields/filteractions/children/addattributetoselection/titleProcess.js +++ /dev/null @@ -1,8 +0,0 @@ -import("system.translate"); -import("system.result"); -import("system.vars"); - -if (vars.get("$sys.selection").length > 0) -{ - result.string(translate.text("set attribute (selected data)")) -} \ No newline at end of file diff --git a/entity/Activity_entity/entityfields/msteamsactions/children/importfromteams/onActionProcess.js b/entity/Activity_entity/entityfields/msteamsactions/children/importfromteams/onActionProcess.js index 102768f5f8e122cca4946d1cce6beae65d2e3ff5..a0958f84e7767e0d2f57a1d00b5def19e6dd08cb 100644 --- a/entity/Activity_entity/entityfields/msteamsactions/children/importfromteams/onActionProcess.js +++ b/entity/Activity_entity/entityfields/msteamsactions/children/importfromteams/onActionProcess.js @@ -1,7 +1,9 @@ +import("system.neonFilter"); import("system.vars"); import("system.neon"); -neon.openContext("MSTeamsActivityImport", "MSTeamsActivityImportEdit_view", null, neon.OPERATINGSTATE_VIEW, { +var recipe = neonFilter.createEntityRecordsRecipeBuilder().parameters({ "ObjectRowId_param" : vars.get("$param.RowId_param"), "ObjectType_param": vars.get("$param.ObjectId_param") -}); \ No newline at end of file +}).toString(); +neon.openContextWithRecipe("MSTeamsActivityImport", "MSTeamsActivityImportEdit_view", recipe, neon.OPERATINGSTATE_VIEW); diff --git a/entity/AddAttributesToSelection_entity/AddAttributesToSelection_entity.aod b/entity/AddAttributesToSelection_entity/AddAttributesToSelection_entity.aod index c8c1cae7589b59153447742efe69bada4f51a862..4fd2c4165465a670f1653122fd639795f087df9f 100644 --- a/entity/AddAttributesToSelection_entity/AddAttributesToSelection_entity.aod +++ b/entity/AddAttributesToSelection_entity/AddAttributesToSelection_entity.aod @@ -1,6 +1,7 @@ <?xml version="1.0" encoding="UTF-8"?> <entity xmlns="http://www.adito.de/2018/ao/Model" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" VERSION="1.3.22" xsi:schemaLocation="http://www.adito.de/2018/ao/Model adito://models/xsd/entity/1.3.22"> <name>AddAttributesToSelection_entity</name> + <title>Set attribute</title> <majorModelMode>DISTRIBUTED</majorModelMode> <documentation>%aditoprj%/entity/AddAttributesToSelection_entity/documentation.adoc</documentation> <recordContainer>jDito</recordContainer> @@ -14,9 +15,11 @@ </entityProvider> <entityField> <name>UID</name> + <state>INVISIBLE</state> </entityField> <entityField> <name>affectedData</name> + <title>Affected rows</title> <state>DISABLED</state> <displayValueProcess>%aditoprj%/entity/AddAttributesToSelection_entity/entityfields/affecteddata/displayValueProcess.js</displayValueProcess> </entityField> diff --git a/entity/AddAttributesToSelection_entity/entityfields/affecteddata/displayValueProcess.js b/entity/AddAttributesToSelection_entity/entityfields/affecteddata/displayValueProcess.js index 07e52aa6c0d1850bd5ae108e6db373166807a3de..6d7315c3a2254ff54e27a3be2fe53f78409b02ff 100644 --- a/entity/AddAttributesToSelection_entity/entityfields/affecteddata/displayValueProcess.js +++ b/entity/AddAttributesToSelection_entity/entityfields/affecteddata/displayValueProcess.js @@ -2,4 +2,4 @@ import("system.vars"); import("system.translate"); import("system.result"); -result.string(translate.text("affected rows:") + " " + parseInt(vars.get("$param.Datalength_param"), "#0")); \ No newline at end of file +result.string(parseInt(vars.get("$param.Datalength_param"), "#0")); \ No newline at end of file diff --git a/entity/AddAttributesToSelection_entity/recordcontainers/jdito/contentProcess.js b/entity/AddAttributesToSelection_entity/recordcontainers/jdito/contentProcess.js index fe136ec30bdf4885bfb0c7160cdde9abccb011de..8a8b23ca6e41d5f262b6e6e9d5d47ddb8f0d2c56 100644 --- a/entity/AddAttributesToSelection_entity/recordcontainers/jdito/contentProcess.js +++ b/entity/AddAttributesToSelection_entity/recordcontainers/jdito/contentProcess.js @@ -3,5 +3,5 @@ import("system.vars"); if(vars.get("$local.idvalues")) { -result.object([vars.get("$local.idvalues")]); + result.object([vars.get("$local.idvalues")]); } \ No newline at end of file diff --git a/entity/Address_entity/Address_entity.aod b/entity/Address_entity/Address_entity.aod index 1cfe28c6019782ac295bace24ef002e4a268a69c..1906e65437b99a243197f863a3c7fa3f921900fc 100644 --- a/entity/Address_entity/Address_entity.aod +++ b/entity/Address_entity/Address_entity.aod @@ -4,6 +4,7 @@ <title>Address</title> <majorModelMode>DISTRIBUTED</majorModelMode> <documentation>%aditoprj%/entity/Address_entity/documentation.adoc</documentation> + <grantDeleteProcess>%aditoprj%/entity/Address_entity/grantDeleteProcess.js</grantDeleteProcess> <contentTitleProcess>%aditoprj%/entity/Address_entity/contentTitleProcess.js</contentTitleProcess> <afterOperatingState>%aditoprj%/entity/Address_entity/afterOperatingState.js</afterOperatingState> <titlePlural>Addresses</titlePlural> @@ -12,7 +13,7 @@ <entityField> <name>ADDRESS</name> <title>Street</title> - <mandatory v="true" /> + <mandatoryProcess>%aditoprj%/entity/Address_entity/entityfields/address/mandatoryProcess.js</mandatoryProcess> <textInputAllowed v="false" /> <stateProcess>%aditoprj%/entity/Address_entity/entityfields/address/stateProcess.js</stateProcess> <titleProcess>%aditoprj%/entity/Address_entity/entityfields/address/titleProcess.js</titleProcess> @@ -57,7 +58,7 @@ <name>CITY</name> <documentation>%aditoprj%/entity/Address_entity/entityfields/city/documentation.adoc</documentation> <title>City</title> - <mandatory v="true" /> + <mandatoryProcess>%aditoprj%/entity/Address_entity/entityfields/city/mandatoryProcess.js</mandatoryProcess> <stateProcess>%aditoprj%/entity/Address_entity/entityfields/city/stateProcess.js</stateProcess> <onValueChange>%aditoprj%/entity/Address_entity/entityfields/city/onValueChange.js</onValueChange> <onValueChangeTypes> @@ -109,7 +110,7 @@ <entityField> <name>ZIP</name> <title>Postcode</title> - <mandatory v="true" /> + <mandatoryProcess>%aditoprj%/entity/Address_entity/entityfields/zip/mandatoryProcess.js</mandatoryProcess> <stateProcess>%aditoprj%/entity/Address_entity/entityfields/zip/stateProcess.js</stateProcess> <onValueChange>%aditoprj%/entity/Address_entity/entityfields/zip/onValueChange.js</onValueChange> <onValueChangeTypes> diff --git a/entity/Address_entity/entityfields/address/mandatoryProcess.js b/entity/Address_entity/entityfields/address/mandatoryProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..132a366dcb5b5d251185bd279041ab7766e1f9eb --- /dev/null +++ b/entity/Address_entity/entityfields/address/mandatoryProcess.js @@ -0,0 +1,6 @@ +import("system.vars"); +import("Entity_lib"); +import("system.result"); +import("AddressEntity_lib"); + +result.object(AddressEntityValidation.isMandatoryField(vars.get("$field.COUNTRY"))); \ No newline at end of file diff --git a/entity/Address_entity/entityfields/addresssearch/valueProcess.js b/entity/Address_entity/entityfields/addresssearch/valueProcess.js index 094a9ae8b2a2d5c5f2a5e68c905b3545ffbfa167..edf5b63e68caf350d0853f543097b4706ab6130b 100644 --- a/entity/Address_entity/entityfields/addresssearch/valueProcess.js +++ b/entity/Address_entity/entityfields/addresssearch/valueProcess.js @@ -1,4 +1,3 @@ -import("system.logging"); import("system.result"); import("WsValidation_lib"); import("system.vars"); diff --git a/entity/Address_entity/entityfields/city/mandatoryProcess.js b/entity/Address_entity/entityfields/city/mandatoryProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..132a366dcb5b5d251185bd279041ab7766e1f9eb --- /dev/null +++ b/entity/Address_entity/entityfields/city/mandatoryProcess.js @@ -0,0 +1,6 @@ +import("system.vars"); +import("Entity_lib"); +import("system.result"); +import("AddressEntity_lib"); + +result.object(AddressEntityValidation.isMandatoryField(vars.get("$field.COUNTRY"))); \ No newline at end of file diff --git a/entity/Address_entity/entityfields/zip/mandatoryProcess.js b/entity/Address_entity/entityfields/zip/mandatoryProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..132a366dcb5b5d251185bd279041ab7766e1f9eb --- /dev/null +++ b/entity/Address_entity/entityfields/zip/mandatoryProcess.js @@ -0,0 +1,6 @@ +import("system.vars"); +import("Entity_lib"); +import("system.result"); +import("AddressEntity_lib"); + +result.object(AddressEntityValidation.isMandatoryField(vars.get("$field.COUNTRY"))); \ No newline at end of file diff --git a/entity/Address_entity/grantDeleteProcess.js b/entity/Address_entity/grantDeleteProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..1ff017fe95e1d94626b6c1f04907066194d6402d --- /dev/null +++ b/entity/Address_entity/grantDeleteProcess.js @@ -0,0 +1,5 @@ +import("system.result"); +import("system.vars"); +import("Util_lib"); + +result.string(!Utils.toBoolean(vars.get("$field.IS_STANDARD"))); \ No newline at end of file diff --git a/entity/AdvertisingItem_entity/entityfields/product_id/displayValueProcess.js b/entity/AdvertisingItem_entity/entityfields/product_id/displayValueProcess.js index b4a2de7925b59431605cf8b91378dd681e9b342c..34b95afc4d4ac6372590ed4ff00a350dee2fd895 100644 --- a/entity/AdvertisingItem_entity/entityfields/product_id/displayValueProcess.js +++ b/entity/AdvertisingItem_entity/entityfields/product_id/displayValueProcess.js @@ -1,8 +1,10 @@ +import("system.neon"); +import("Product_lib"); import("system.vars"); import("system.result"); import("Sql_lib"); -if(vars.get("$field.PRODUCT_ID")) +if(vars.get("$field.PRODUCT_ID") && vars.get("$sys.viewmode") != neon.FRAME_VIEWMODE_TABLE) { - result.string(newSelect("PRODUCT.PRODUCTNAME").from("PRODUCT").whereIfSet("PRODUCT.PRODUCTID", vars.get("$field.PRODUCT_ID")).cell()); + result.string(ProductUtils.getProductName(vars.get("$field.PRODUCT_ID"))); } \ No newline at end of file diff --git a/entity/AdvertisingItem_entity/recordcontainers/db/recordfieldmappings/product_id.displayvalue/expression.js b/entity/AdvertisingItem_entity/recordcontainers/db/recordfieldmappings/product_id.displayvalue/expression.js index c3affdfee4c46dd197d303f0ef5df1c5ec19119f..deadc02e144b0fdb61aafe54fa54efe36bcb19cb 100644 --- a/entity/AdvertisingItem_entity/recordcontainers/db/recordfieldmappings/product_id.displayvalue/expression.js +++ b/entity/AdvertisingItem_entity/recordcontainers/db/recordfieldmappings/product_id.displayvalue/expression.js @@ -1,8 +1,6 @@ -import("system.vars"); +import("Product_lib"); import("system.result"); -import("Sql_lib"); -result.string(newSelect("PRODUCT.PRODUCTNAME") - .from("PRODUCT") - .where("ADVERTISINGITEM.PRODUCT_ID = PRODUCT.PRODUCTID") - .toString()); \ No newline at end of file +result.string(ProductUtils.getProductNameSubSql("ADVERTISINGITEM.PRODUCT_ID")); + + \ No newline at end of file diff --git a/entity/Advertising_entity/Advertising_entity.aod b/entity/Advertising_entity/Advertising_entity.aod index a2e6c6eddca3ad9d6741217785478f9ffa694bcd..6313f129f407dee8485069f4e2b1cfec2c9459f9 100644 --- a/entity/Advertising_entity/Advertising_entity.aod +++ b/entity/Advertising_entity/Advertising_entity.aod @@ -241,6 +241,10 @@ </entityParameter> </children> </entityConsumer> + <entityField> + <name>PICTURE</name> + <contentType>IMAGE</contentType> + </entityField> </entityFields> <recordContainers> <dbRecordContainer> @@ -327,6 +331,10 @@ <dbRecordFieldMapping> <name>OBJECT_ROWID.displayValue</name> </dbRecordFieldMapping> + <dbRecordFieldMapping> + <name>PICTURE.value</name> + <expression>%aditoprj%/entity/Advertising_entity/recordcontainers/db/recordfieldmappings/picture.value/expression.js</expression> + </dbRecordFieldMapping> </recordFieldMappings> <linkInformation> <linkInformation> diff --git a/entity/Advertising_entity/recordcontainers/db/recordfieldmappings/picture.value/expression.js b/entity/Advertising_entity/recordcontainers/db/recordfieldmappings/picture.value/expression.js new file mode 100644 index 0000000000000000000000000000000000000000..178f7678744e9648068bc39897c0ad7bfb07a277 --- /dev/null +++ b/entity/Advertising_entity/recordcontainers/db/recordfieldmappings/picture.value/expression.js @@ -0,0 +1,12 @@ +import("Product_lib"); +import("Person_lib"); +import("KeywordRegistry_basic"); +import("Keyword_lib"); +import("system.result"); +import("Sql_lib"); + +var sqlMask = new SqlMaskingUtils(); + +var sql = sqlMask.concatenate(["'TEXT:'", "(" + KeywordUtils.getResolvedTitleSqlPart($KeywordRegistry.advertisingStatus(), "ADVERTISING.STATUS") + ")"]); + +result.string(sql.toString()); \ No newline at end of file diff --git a/entity/Analyses_entity/entityfields/opennewtasks/onActionProcess.js b/entity/Analyses_entity/entityfields/opennewtasks/onActionProcess.js index 696815d5aed5b5a1394a46b3f2d46c29fff8a024..2f701771cd41a63b1ee8d0d542e23e141308d1d2 100644 --- a/entity/Analyses_entity/entityfields/opennewtasks/onActionProcess.js +++ b/entity/Analyses_entity/entityfields/opennewtasks/onActionProcess.js @@ -1,3 +1,4 @@ +import("system.neonFilter"); import("KeywordRegistry_basic"); import("Sql_lib"); import("Employee_lib"); @@ -8,5 +9,6 @@ var taskIds = newSelect("TASKID") .where("TASK.STATUS", $KeywordRegistry.taskStatus$new()) .and("TASK.EDITOR_CONTACT_ID", EmployeeUtils.getCurrentContactId()) .arrayColumn(); - -neon.openContext("Task", "TaskFilter_view", taskIds, neon.OPERATINGSTATE_SEARCH, null); \ No newline at end of file + +var recipe = neonFilter.createEntityRecordsRecipeBuilder().uidsIncludelist(taskIds).toString(); +neon.openContextWithRecipe("Task", "TaskFilter_view", recipe, neon.OPERATINGSTATE_SEARCH); diff --git a/entity/Analyses_entity/entityfields/openoverduetasks/onActionProcess.js b/entity/Analyses_entity/entityfields/openoverduetasks/onActionProcess.js index d52c73bc8af0af61536cfc466df6fce12a8c290c..dfbf3354e41132c7c7cb91e35582ac466f36c00e 100644 --- a/entity/Analyses_entity/entityfields/openoverduetasks/onActionProcess.js +++ b/entity/Analyses_entity/entityfields/openoverduetasks/onActionProcess.js @@ -1,3 +1,4 @@ +import("system.neonFilter"); import("system.neon"); import("system.db"); import("ActivityTask_lib"); @@ -12,4 +13,5 @@ var overdueTask = newSelect("TASKID") .and("TASK.STATUS", TaskUtils.getEndedStatuses(), SqlBuilder.NOT_IN()) .array(db.COLUMN) -neon.openContext("Task", "TaskFilter_view", overdueTask, neon.OPERATINGSTATE_SEARCH, null); \ No newline at end of file +var recipe = neonFilter.createEntityRecordsRecipeBuilder().uidsIncludelist(overdueTask).toString(); +neon.openContextWithRecipe("Task", "TaskFilter_view", recipe, neon.OPERATINGSTATE_SEARCH); diff --git a/entity/AroundLocation_entity/entityfields/open/onActionProcess.js b/entity/AroundLocation_entity/entityfields/open/onActionProcess.js index 10fa1eeb0072f9ca47d9df86503fbd82c530de2f..77d21992f55c0b993866b5756e932726303b8b40 100644 --- a/entity/AroundLocation_entity/entityfields/open/onActionProcess.js +++ b/entity/AroundLocation_entity/entityfields/open/onActionProcess.js @@ -1,3 +1,4 @@ +import("system.neonFilter"); import("Context_lib"); import("system.vars"); import("system.neon"); @@ -38,4 +39,6 @@ var params = { MapViewCenterLat_param: vars.get("$param.LocationLat_param"), MapViewCenterLon_param: vars.get("$param.LocationLon_param") }; -neon.openContext("Organisation", "OrganisationFilter_view", contactIds, neon.OPERATINGSTATE_SEARCH, params, null); \ No newline at end of file + +var recipe = neonFilter.createEntityRecordsRecipeBuilder().uidsIncludelist(contactIds).parameters(params).toString(); +neon.openContextWithRecipe("Organisation", "OrganisationFilter_view", recipe, neon.OPERATINGSTATE_SEARCH); diff --git a/entity/BulkMailRecipient_entity/entityfields/recipientactions/children/startmarketingworkflows/onActionProcess.js b/entity/BulkMailRecipient_entity/entityfields/recipientactions/children/startmarketingworkflows/onActionProcess.js index cbe91449e5c258643491b9020a7bc6d1b534e7ec..5c87295ed514398e4496a25bb605369cdd9adbe6 100644 --- a/entity/BulkMailRecipient_entity/entityfields/recipientactions/children/startmarketingworkflows/onActionProcess.js +++ b/entity/BulkMailRecipient_entity/entityfields/recipientactions/children/startmarketingworkflows/onActionProcess.js @@ -1,3 +1,4 @@ +import("system.neonFilter"); import("Util_lib"); import("system.entities"); import("Context_lib"); @@ -28,7 +29,8 @@ rows = rows.map(function (row) }); -neon.openContext("MarketingWorkflowLauncher", "MarketingWorkflowLauncherEdit_view", null, neon.OPERATINGSTATE_VIEW, { +var recipe = neonFilter.createEntityRecordsRecipeBuilder().parameters({ "ObjectIds_param": JSON.stringify(rows), "ObjectType_param": ContextUtils.getCurrentContextId() -}); \ No newline at end of file +}).toString(); +neon.openContextWithRecipe("MarketingWorkflowLauncher", "MarketingWorkflowLauncherEdit_view", recipe, neon.OPERATINGSTATE_VIEW); diff --git a/entity/BulkMail_entity/entityfields/newmosaicotemplate/onActionProcess.js b/entity/BulkMail_entity/entityfields/newmosaicotemplate/onActionProcess.js index 55e632ebbcdeb6bf790e5834e6df79e9fe6747a5..ed1f4786720fba1f5dd9b24c8bf8b84830906345 100644 --- a/entity/BulkMail_entity/entityfields/newmosaicotemplate/onActionProcess.js +++ b/entity/BulkMail_entity/entityfields/newmosaicotemplate/onActionProcess.js @@ -1,3 +1,4 @@ +import("system.neonFilter"); import("system.neon"); import("system.vars") @@ -5,4 +6,5 @@ var params = { "BulkMailId_param": vars.get("$field.BULKMAILID") }; -neon.openContext("BulkMailAddMosaico", "BulkMailAddMosaicoEdit_view",null, neon.OPERATINGSTATE_VIEW, params, null); \ No newline at end of file +var recipe = neonFilter.createEntityRecordsRecipeBuilder().parameters(params).toString(); +neon.openContextWithRecipe("BulkMailAddMosaico", "BulkMailAddMosaicoEdit_view", recipe, neon.OPERATINGSTATE_VIEW); diff --git a/entity/CampaignAddParticipants_entity/entityfields/addparticipants/onActionProcess.js b/entity/CampaignAddParticipants_entity/entityfields/addparticipants/onActionProcess.js index 84403dfc78ca03abd5aa665ef054d32d5ff86275..7b774b41e6d32f8196bd6fc16601a58f90b0bded 100644 --- a/entity/CampaignAddParticipants_entity/entityfields/addparticipants/onActionProcess.js +++ b/entity/CampaignAddParticipants_entity/entityfields/addparticipants/onActionProcess.js @@ -1,3 +1,4 @@ +import("system.neonFilter"); import("system.workflow"); import("ActivityTask_lib"); import("Contact_lib"); @@ -33,7 +34,8 @@ if(contactIds != null && contactIds.length > 0) neon.refreshAll(); if (!vars.exists("$param.currentCampaignId_param") || !vars.get("$param.currentCampaignId_param")) { - neon.openContext("Campaign", "CampaignMain_view", [campaignId], neon.OPERATINGSTATE_VIEW, null); + var recipe = neonFilter.createEntityRecordsRecipeBuilder().uidsIncludelist([campaignId]).toString(); + neon.openContextWithRecipe("Campaign", "CampaignMain_view", recipe, neon.OPERATINGSTATE_VIEW); } else { diff --git a/entity/CampaignPlanning_entity/CampaignPlanning_entity.aod b/entity/CampaignPlanning_entity/CampaignPlanning_entity.aod index 7d1b72b5fd598bf7847b69cb4519f56c792343ce..536bd367d157853a52038ca079f76c09ea7d0f11 100644 --- a/entity/CampaignPlanning_entity/CampaignPlanning_entity.aod +++ b/entity/CampaignPlanning_entity/CampaignPlanning_entity.aod @@ -64,11 +64,6 @@ <iconId>NEON:GROUP_APPOINTMENT</iconId> <tooltipProcess>%aditoprj%/entity/CampaignPlanning_entity/entityfields/newganttentries/children/createnewcampaignstep_action/tooltipProcess.js</tooltipProcess> </entityActionField> - <entityActionField> - <name>testfilter</name> - <title>testfilter</title> - <onActionProcess>%aditoprj%/entity/CampaignPlanning_entity/entityfields/newganttentries/children/testfilter/onActionProcess.js</onActionProcess> - </entityActionField> </children> </entityActionGroup> <entityField> diff --git a/entity/CampaignPlanning_entity/entityfields/newganttentries/children/testfilter/onActionProcess.js b/entity/CampaignPlanning_entity/entityfields/newganttentries/children/testfilter/onActionProcess.js deleted file mode 100644 index 0179cd4c1c9cb1b5f50e0fbf86883aa758a85bbd..0000000000000000000000000000000000000000 --- a/entity/CampaignPlanning_entity/entityfields/newganttentries/children/testfilter/onActionProcess.js +++ /dev/null @@ -1,3 +0,0 @@ -import("system.vars"); -import("system.logging"); -logging.log(JSON.stringify(vars.get("$sys.filter"))); \ No newline at end of file diff --git a/entity/CampaignStep_entity/entityfields/newcampaignstep/onActionProcess.js b/entity/CampaignStep_entity/entityfields/newcampaignstep/onActionProcess.js index 0c0f7ed6eae7bfa476f1bc34efa2cbf3bc0c2644..8913e928050cf976d228269454ac4382cb9819ab 100644 --- a/entity/CampaignStep_entity/entityfields/newcampaignstep/onActionProcess.js +++ b/entity/CampaignStep_entity/entityfields/newcampaignstep/onActionProcess.js @@ -1,7 +1,9 @@ +import("system.neonFilter"); import("system.vars"); import("system.neon"); -neon.openContext("CampaignStep", "CampaignStepEdit_view", null, neon.OPERATINGSTATE_NEW, { +var recipe = neonFilter.createEntityRecordsRecipeBuilder().parameters({ campaignId_param: vars.get("$param.campaignId_param"), predecessorstepId_param: vars.get("$field.CAMPAIGNSTEPID") -}); \ No newline at end of file +}).toString(); +neon.openContextWithRecipe("CampaignStep", "CampaignStepEdit_view", recipe, neon.OPERATINGSTATE_NEW); diff --git a/entity/CommunicationSettings_entity/CommunicationSettings_entity.aod b/entity/CommunicationSettings_entity/CommunicationSettings_entity.aod index 8a34a28bae22a7aafcd633e3119bb5241da7aa17..ee03291546c62fa53d3341ee371d1aaef3dcc44b 100644 --- a/entity/CommunicationSettings_entity/CommunicationSettings_entity.aod +++ b/entity/CommunicationSettings_entity/CommunicationSettings_entity.aod @@ -213,6 +213,10 @@ <contentType>BOOLEAN</contentType> <valueProcess>%aditoprj%/entity/CommunicationSettings_entity/entityfields/isactive/valueProcess.js</valueProcess> </entityField> + <entityField> + <name>PICTURE</name> + <contentType>IMAGE</contentType> + </entityField> </entityFields> <recordContainers> <dbRecordContainer> @@ -319,6 +323,10 @@ <recordfield>COMMUNICATIONSETTINGS.ISACTIVE</recordfield> <isFilterable v="true" /> </dbRecordFieldMapping> + <dbRecordFieldMapping> + <name>PICTURE.value</name> + <expression>%aditoprj%/entity/CommunicationSettings_entity/recordcontainers/db/recordfieldmappings/picture.value/expression.js</expression> + </dbRecordFieldMapping> </recordFieldMappings> <linkInformation> <linkInformation> diff --git a/entity/CommunicationSettings_entity/recordcontainers/db/recordfieldmappings/picture.value/expression.js b/entity/CommunicationSettings_entity/recordcontainers/db/recordfieldmappings/picture.value/expression.js new file mode 100644 index 0000000000000000000000000000000000000000..151dab31e962c410ae539f2d6d547c91423afc99 --- /dev/null +++ b/entity/CommunicationSettings_entity/recordcontainers/db/recordfieldmappings/picture.value/expression.js @@ -0,0 +1,13 @@ +import("Product_lib"); +import("Person_lib"); +import("KeywordRegistry_basic"); +import("Keyword_lib"); +import("system.result"); +import("Sql_lib"); + +var sqlMask = new SqlMaskingUtils(); + +var sql = sqlMask.concatenate(["'TEXT:'", + "(" + KeywordUtils.getResolvedTitleSqlPart($KeywordRegistry.communicationSettingStatus(), "COMMUNICATIONSETTINGS.STATUS") + ")"]); + +result.string(sql.toString()); \ No newline at end of file diff --git a/entity/Contact_entity/Contact_entity.aod b/entity/Contact_entity/Contact_entity.aod index 599739ccf13b1d4875a6363e357fe4b2173c9fe5..565d3921eaab206b52bfddaf1b5d9d8942e3fa74 100644 --- a/entity/Contact_entity/Contact_entity.aod +++ b/entity/Contact_entity/Contact_entity.aod @@ -68,6 +68,10 @@ <name>ExcludeOrganisationsByPersonId</name> <valueProcess>%aditoprj%/entity/Contact_entity/entityfields/organisations/children/excludeorganisationsbypersonid/valueProcess.js</valueProcess> </entityParameter> + <entityParameter> + <name>WithPrivate_param</name> + <valueProcess>%aditoprj%/entity/Contact_entity/entityfields/organisations/children/withprivate_param/valueProcess.js</valueProcess> + </entityParameter> </children> </entityConsumer> <entityParameter> @@ -214,6 +218,7 @@ <title>Company</title> <consumer>Organisations</consumer> <linkedContextProcess>%aditoprj%/entity/Contact_entity/entityfields/organisation_contactid/linkedContextProcess.js</linkedContextProcess> + <mandatory v="true" /> <displayValueProcess>%aditoprj%/entity/Contact_entity/entityfields/organisation_contactid/displayValueProcess.js</displayValueProcess> <onValidation>%aditoprj%/entity/Contact_entity/entityfields/organisation_contactid/onValidation.js</onValidation> </entityField> @@ -270,6 +275,10 @@ </entityParameter> </children> </entityConsumer> + <entityField> + <name>PICTURE</name> + <contentType>IMAGE</contentType> + </entityField> </entityFields> <recordContainers> <dbRecordContainer> @@ -362,6 +371,10 @@ <name>DEPARTMENT.displayValue</name> <expression>%aditoprj%/entity/Contact_entity/recordcontainers/db/recordfieldmappings/department.displayvalue/expression.js</expression> </dbRecordFieldMapping> + <dbRecordFieldMapping> + <name>PICTURE.value</name> + <expression>%aditoprj%/entity/Contact_entity/recordcontainers/db/recordfieldmappings/picture.value/expression.js</expression> + </dbRecordFieldMapping> </recordFieldMappings> <linkInformation> <linkInformation> diff --git a/entity/Contact_entity/entityfields/organisation_id/valueProcess.js b/entity/Contact_entity/entityfields/organisation_id/valueProcess.js index e3771ef7f2a21107b978f25667f92be8609b941c..8a076649810d270f11a993785ccc13ecf2f9a39d 100644 --- a/entity/Contact_entity/entityfields/organisation_id/valueProcess.js +++ b/entity/Contact_entity/entityfields/organisation_id/valueProcess.js @@ -3,7 +3,7 @@ import("system.result"); import("Contact_lib"); var orgContactId = vars.get("$field.ORGANISATION_CONTACTID"); -var organisationIds = ContactUtils.getPersOrgIds(orgContactId) +var organisationIds = ContactUtils.getPersOrgIds(orgContactId); if (organisationIds.length > 0 && organisationIds[2]) { diff --git a/entity/Person_entity/recordcontainers/db/recordfieldmappings/title.displayvalue/expression.js b/entity/Contact_entity/entityfields/organisations/children/withprivate_param/valueProcess.js similarity index 53% rename from entity/Person_entity/recordcontainers/db/recordfieldmappings/title.displayvalue/expression.js rename to entity/Contact_entity/entityfields/organisations/children/withprivate_param/valueProcess.js index b02537f776e09bb62333e1b0921b9fe913f1599d..40effa0178464da0c7850912345f19c7fa95975a 100644 --- a/entity/Person_entity/recordcontainers/db/recordfieldmappings/title.displayvalue/expression.js +++ b/entity/Contact_entity/entityfields/organisations/children/withprivate_param/valueProcess.js @@ -1,3 +1,3 @@ import("system.result"); -result.string("TITLE"); \ No newline at end of file +result.string(true); \ No newline at end of file diff --git a/entity/Contact_entity/recordcontainers/db/recordfieldmappings/picture.value/expression.js b/entity/Contact_entity/recordcontainers/db/recordfieldmappings/picture.value/expression.js new file mode 100644 index 0000000000000000000000000000000000000000..443ec0029ced9d97f3c196a6584200855585c4e9 --- /dev/null +++ b/entity/Contact_entity/recordcontainers/db/recordfieldmappings/picture.value/expression.js @@ -0,0 +1,12 @@ +import("Product_lib"); +import("Person_lib"); +import("KeywordRegistry_basic"); +import("Keyword_lib"); +import("system.result"); +import("Sql_lib"); + +var sqlMask = new SqlMaskingUtils(); + +var sql = sqlMask.concatenate(["'TEXT:'", "ORGANISATION.NAME"]); + +result.string(sql.toString()); \ No newline at end of file diff --git a/entity/DSGVOConfiguration_entity/entityfields/opencontacts/onActionProcess.js b/entity/DSGVOConfiguration_entity/entityfields/opencontacts/onActionProcess.js index 36f8bf311d6d36d3c7f19d97c0df4c02ad6ae438..8c29f82e1f07b99f989e814d06bce6b9a9765950 100644 --- a/entity/DSGVOConfiguration_entity/entityfields/opencontacts/onActionProcess.js +++ b/entity/DSGVOConfiguration_entity/entityfields/opencontacts/onActionProcess.js @@ -1,7 +1,9 @@ +import("system.neonFilter"); import("system.translate"); import("system.vars"); import("system.neon"); -neon.openContext("Person", "PersonFilterOverlay_view", null, neon.OPERATINGSTATE_SEARCH , { +var recipe = neonFilter.createEntityRecordsRecipeBuilder().parameters({ FilterPreSet_param: JSON.stringify(JSON.parse(vars.get("$field.FILTER")).filter) -}); \ No newline at end of file +}).toString(); +neon.openContextWithRecipe("Person", "PersonFilterOverlay_view", recipe, neon.OPERATINGSTATE_SEARCH); diff --git a/entity/DSGVO_entity/entityfields/reports/children/opendisclosurereport/onActionProcess.js b/entity/DSGVO_entity/entityfields/reports/children/opendisclosurereport/onActionProcess.js index b92d3e414a7b9a7ea174c2108f4c8c57b6048b9f..954fa8bb916e975d22f8972017d48136e1d962d7 100644 --- a/entity/DSGVO_entity/entityfields/reports/children/opendisclosurereport/onActionProcess.js +++ b/entity/DSGVO_entity/entityfields/reports/children/opendisclosurereport/onActionProcess.js @@ -1,3 +1,4 @@ +import("system.neonFilter"); import("system.vars"); import("DataPrivacy_lib"); import("system.neon"); @@ -14,8 +15,8 @@ if (entities.getRowCount(conf) > 0) mode = neon.OPERATINGSTATE_EDIT; } -neon.openContext("DSGVOInfo", "DSGVOInfoEdit_view", null, mode, - { - ContactId_param: vars.get("$field.CONTACT_ID"), - ReportType_param: DataPrivacyUtils.DisclosureReportName() - }); \ No newline at end of file +var recipe = neonFilter.createEntityRecordsRecipeBuilder().parameters({ + ContactId_param: vars.get("$field.CONTACT_ID"), + ReportType_param: DataPrivacyUtils.DisclosureReportName() +}).toString(); +neon.openContextWithRecipe("DSGVOInfo", "DSGVOInfoEdit_view", recipe, mode); diff --git a/entity/DSGVO_entity/entityfields/reports/children/openinforeport/onActionProcess.js b/entity/DSGVO_entity/entityfields/reports/children/openinforeport/onActionProcess.js index 1ea74f266d1a21459b5ae696fbcc4899dc280f9e..7f6f025a47c908c1e6922885c833d35a6b7adb6c 100644 --- a/entity/DSGVO_entity/entityfields/reports/children/openinforeport/onActionProcess.js +++ b/entity/DSGVO_entity/entityfields/reports/children/openinforeport/onActionProcess.js @@ -1,3 +1,4 @@ +import("system.neonFilter"); import("system.vars"); import("DataPrivacy_lib"); import("system.neon"); @@ -14,8 +15,8 @@ if (entities.getRowCount(conf) > 0) mode = neon.OPERATINGSTATE_EDIT; } -neon.openContext("DSGVOInfo", "DSGVOInfoEdit_view", null, mode, - { - "param.ContactId_param": vars.get("$field.CONTACT_ID"), - "param.ReportType_param": "DSGVO_Information_report" - }); \ No newline at end of file +var recipe = neonFilter.createEntityRecordsRecipeBuilder().parameters({ + "param.ContactId_param": vars.get("$field.CONTACT_ID"), + "param.ReportType_param": "DSGVO_Information_report" +}).toString(); +neon.openContextWithRecipe("DSGVOInfo", "DSGVOInfoEdit_view", recipe, mode); diff --git a/entity/DescriptionTranslation_entity/DescriptionTranslation_entity.aod b/entity/DescriptionTranslation_entity/DescriptionTranslation_entity.aod index 0be0b503e687cb860570374d7f8780567f882aa5..de4a3074d378fac4b2ddf8aa90c01cebe02c608e 100644 --- a/entity/DescriptionTranslation_entity/DescriptionTranslation_entity.aod +++ b/entity/DescriptionTranslation_entity/DescriptionTranslation_entity.aod @@ -69,6 +69,10 @@ <name>#PROVIDER_AGGREGATES</name> <useAggregates v="true" /> </entityProvider> + <entityField> + <name>PICTURE</name> + <contentType>IMAGE</contentType> + </entityField> </entityFields> <recordContainers> <dbRecordContainer> @@ -100,6 +104,10 @@ <name>LANG.displayValue</name> <expression>%aditoprj%/entity/DescriptionTranslation_entity/recordcontainers/db/recordfieldmappings/lang.displayvalue/expression.js</expression> </dbRecordFieldMapping> + <dbRecordFieldMapping> + <name>PICTURE.value</name> + <expression>%aditoprj%/entity/DescriptionTranslation_entity/recordcontainers/db/recordfieldmappings/picture.value/expression.js</expression> + </dbRecordFieldMapping> </recordFieldMappings> <linkInformation> <linkInformation> diff --git a/entity/DescriptionTranslation_entity/recordcontainers/db/recordfieldmappings/picture.value/expression.js b/entity/DescriptionTranslation_entity/recordcontainers/db/recordfieldmappings/picture.value/expression.js new file mode 100644 index 0000000000000000000000000000000000000000..7e503d7b46f85dbd0e1f02ef14e7798676801577 --- /dev/null +++ b/entity/DescriptionTranslation_entity/recordcontainers/db/recordfieldmappings/picture.value/expression.js @@ -0,0 +1,12 @@ +import("Product_lib"); +import("Person_lib"); +import("KeywordRegistry_basic"); +import("Keyword_lib"); +import("system.result"); +import("Sql_lib"); + +var sqlMask = new SqlMaskingUtils(); + +var sql = sqlMask.concatenate(["'TEXT:'", "(" + LanguageKeywordUtils.getResolvedTitleSqlPart("DESCRIPTIONTRANSLATION.LANG") + ")"]); + +result.string(sql.toString()); diff --git a/entity/DistrictContact_entity/entityfields/filterviewactiongroup/children/changevalidity/onActionProcess.js b/entity/DistrictContact_entity/entityfields/filterviewactiongroup/children/changevalidity/onActionProcess.js index 2c9ee12df9c8241caeeed76b2301de4bc88b1635..1ba1dceffbacbc53b63b0fe55412dd2b9d4f2da2 100644 --- a/entity/DistrictContact_entity/entityfields/filterviewactiongroup/children/changevalidity/onActionProcess.js +++ b/entity/DistrictContact_entity/entityfields/filterviewactiongroup/children/changevalidity/onActionProcess.js @@ -1,3 +1,4 @@ +import("system.neonFilter"); import("system.translate"); import("system.neon"); import("Context_lib"); @@ -24,4 +25,5 @@ var params = { "DistrictContactIds_param": JSON.stringify(districtContactIds) } -neon.openContext("DistrictChangeValidityDates", "DistrictChangeValidityDatesEdit_view", null, neon.OPERATINGSTATE_NEW, params, null); \ No newline at end of file +var recipe = neonFilter.createEntityRecordsRecipeBuilder().parameters(params).toString(); +neon.openContextWithRecipe("DistrictChangeValidityDates", "DistrictChangeValidityDatesEdit_view", recipe, neon.OPERATINGSTATE_NEW); diff --git a/entity/DocumentTemplate_entity/DocumentTemplate_entity.aod b/entity/DocumentTemplate_entity/DocumentTemplate_entity.aod index a7ce89a91dadd56e099566259581ca387063690f..ace6a9112728a7e9a13734755f752940fd015401 100644 --- a/entity/DocumentTemplate_entity/DocumentTemplate_entity.aod +++ b/entity/DocumentTemplate_entity/DocumentTemplate_entity.aod @@ -344,6 +344,10 @@ <name>CreateFromMosaicoTemplateId_param</name> <expose v="true" /> </entityParameter> + <entityParameter> + <name>Language_param</name> + <expose v="true" /> + </entityParameter> </entityFields> <recordContainers> <dbRecordContainer> diff --git a/entity/DocumentTemplate_entity/entityfields/openhtmleditor/onActionProcess.js b/entity/DocumentTemplate_entity/entityfields/openhtmleditor/onActionProcess.js index fffffbec7b3c32bd321a33286a6db7cbd07dc13a..95bb87fdb7da82091fea21a32071d38935f6f94c 100644 --- a/entity/DocumentTemplate_entity/entityfields/openhtmleditor/onActionProcess.js +++ b/entity/DocumentTemplate_entity/entityfields/openhtmleditor/onActionProcess.js @@ -1,6 +1,8 @@ +import("system.neonFilter"); import("system.logging"); import("system.vars"); import("DocumentTemplate_lib"); import("system.neon"); -neon.openContext("DocumentTemplate", "DocumentTemplateHtmlEdit_view", [vars.get("$field.DOCUMENTTEMPLATEID")], neon.OPERATINGSTATE_EDIT, null) +var recipe = neonFilter.createEntityRecordsRecipeBuilder().uidsIncludelist([vars.get("$field.DOCUMENTTEMPLATEID")]).toString(); +neon.openContextWithRecipe("DocumentTemplate", "DocumentTemplateHtmlEdit_view", recipe, neon.OPERATINGSTATE_EDIT); diff --git a/entity/DocumentTemplate_entity/recordcontainers/db/conditionProcess.js b/entity/DocumentTemplate_entity/recordcontainers/db/conditionProcess.js index 3f86dff8db44ea6d741c26b364b951970465fd53..561aceaef5aefddaf09e00a7ac270d013f87ffe9 100644 --- a/entity/DocumentTemplate_entity/recordcontainers/db/conditionProcess.js +++ b/entity/DocumentTemplate_entity/recordcontainers/db/conditionProcess.js @@ -7,7 +7,8 @@ import("Sql_lib"); var cond = newWhere() .andIfSet("DOCUMENTTEMPLATE.KIND", "$param.DocumentTemplateType_param") - .andIfSet("DOCUMENTTEMPLATE.CLASSIFICATION", "$param.DocumentTemplateTypeClassification_param"); + .andIfSet("DOCUMENTTEMPLATE.CLASSIFICATION", "$param.DocumentTemplateTypeClassification_param") + .andIfSet("DOCUMENTTEMPLATE.ISOLANGUAGE", "$param.Language_param"); if(vars.get("$param.ComingFrom_param")) { diff --git a/entity/Document_entity/entityfields/msteam/children/synchronizedocuments/onActionProcess.js b/entity/Document_entity/entityfields/msteam/children/synchronizedocuments/onActionProcess.js index aef50aebaf302304a699c6713ceeec227d70350b..b5d19b241fcde290ecfa196f7c10c71d253828d5 100644 --- a/entity/Document_entity/entityfields/msteam/children/synchronizedocuments/onActionProcess.js +++ b/entity/Document_entity/entityfields/msteam/children/synchronizedocuments/onActionProcess.js @@ -1,9 +1,11 @@ +import("system.neonFilter"); import("system.neon"); import("system.vars"); -neon.openContext("MSTeamsDocument", "MSTeamsDocumentEdit_view", null, neon.OPERATINGSTATE_VIEW, { - "MSTTeamId_param" : vars.get("$param.MSTTeamId_param"), - "ObjectRowId_param" : vars.get("$param.AssignmentRowId_param"), - "AssignmentName_param" : vars.get("$param.AssignmentName_param"), - "AssignmentTable_param" : vars.get("$param.AssignmentTable_param") -}); +var recipe = neonFilter.createEntityRecordsRecipeBuilder().parameters({ + "MSTTeamId_param": vars.get("$param.MSTTeamId_param"), + "ObjectRowId_param": vars.get("$param.AssignmentRowId_param"), + "AssignmentName_param": vars.get("$param.AssignmentName_param"), + "AssignmentTable_param": vars.get("$param.AssignmentTable_param") +}).toString(); +neon.openContextWithRecipe("MSTeamsDocument", "MSTeamsDocumentEdit_view", recipe, neon.OPERATINGSTATE_VIEW); diff --git a/entity/DuplicateScanner_entity/entityfields/filteractions/children/viewduplicates/onActionProcess.js b/entity/DuplicateScanner_entity/entityfields/filteractions/children/viewduplicates/onActionProcess.js index cf88cee6543b98e43bce2a2ac9ab24e9a0f38e9d..b71ad155451122b8ab9ce8747dc0558562ac429c 100644 --- a/entity/DuplicateScanner_entity/entityfields/filteractions/children/viewduplicates/onActionProcess.js +++ b/entity/DuplicateScanner_entity/entityfields/filteractions/children/viewduplicates/onActionProcess.js @@ -1,3 +1,4 @@ +import("system.neonFilter"); import("Sql_lib"); import("system.translate"); import("system.question"); @@ -18,9 +19,10 @@ if(vars.get("$sys.selection").length == 1) .where("UNRELATEDDUPLICATES.DUPLICATETYPE = HASDUPLICATE.OBJECT_TYPE"), SqlBuilder.NOT_IN()) .arrayColumn(); - neon.openContext(contextId, null, duplicateIds, neon.OPERATINGSTATE_SEARCH, null); + var recipe = neonFilter.createEntityRecordsRecipeBuilder().uidsIncludelist(duplicateIds); + neon.openContextWithRecipe(contextId, null, recipe.toString(), neon.OPERATINGSTATE_SEARCH); } else { question.showMessage(translate.text("Please select only one element")); -} \ No newline at end of file +} diff --git a/entity/Duplicate_entity/entityfields/filteractions/children/mergecurrentintoselected/onActionProcess.js b/entity/Duplicate_entity/entityfields/filteractions/children/mergecurrentintoselected/onActionProcess.js index efe4c00f3c7d81a6d5d8c6c03d107304f8e3cb36..5d971f0e43d35cf1b227682d481239bbaeb727e9 100644 --- a/entity/Duplicate_entity/entityfields/filteractions/children/mergecurrentintoselected/onActionProcess.js +++ b/entity/Duplicate_entity/entityfields/filteractions/children/mergecurrentintoselected/onActionProcess.js @@ -1,3 +1,4 @@ +import("system.neonFilter"); import("system.translate"); import("system.question"); import("Employee_lib"); @@ -19,7 +20,8 @@ if(vars.get("$sys.selection").length == 1) let currentContactId = EmployeeUtils.getCurrentContactId() || ""; DuplicateMergeUtils.createMergeSuccessActivity(sourceContactId, targetContactId, currentContactId, context); - neon.openContext(context, null, [targetContactId], neon.OPERATINGSTATE_VIEW, null); + var recipe = neonFilter.createEntityRecordsRecipeBuilder().uidsIncludelist([targetContactId]); + neon.openContextWithRecipe(context, null, recipe.toString(), neon.OPERATINGSTATE_VIEW); } } else diff --git a/entity/EmailFilterHandling_entity/entityfields/filterviewactiongroup/children/setworkflow/onActionProcess.js b/entity/EmailFilterHandling_entity/entityfields/filterviewactiongroup/children/setworkflow/onActionProcess.js index 57bfcdde180441256fb21f64682c4d61217894bf..535c3584bb352512b843f264d4ddcc40b700f16b 100644 --- a/entity/EmailFilterHandling_entity/entityfields/filterviewactiongroup/children/setworkflow/onActionProcess.js +++ b/entity/EmailFilterHandling_entity/entityfields/filterviewactiongroup/children/setworkflow/onActionProcess.js @@ -1,10 +1,12 @@ +import("system.neonFilter"); import("system.vars"); import("system.neon"); var selection = JSON.stringify(vars.get("$sys.selection")); var filter = JSON.stringify(vars.get("$sys.filter")); - neon.openContext("EmailFilterHandlingSetWorkflow", "EmailFilterHandlingSetWorkflowEdit_view", null, neon.OPERATINGSTATE_VIEW, { - "Selection_param": selection, - "Filter_param": filter - }); \ No newline at end of file +var recipe = neonFilter.createEntityRecordsRecipeBuilder().parameters({ + "Selection_param": selection, + "Filter_param": filter +}).toString(); +neon.openContextWithRecipe("EmailFilterHandlingSetWorkflow", "EmailFilterHandlingSetWorkflowEdit_view", recipe, neon.OPERATINGSTATE_VIEW); diff --git a/entity/Email_entity/Email_entity.aod b/entity/Email_entity/Email_entity.aod index d052d52f1b9437b05fc21ffa314a3931f9acff4c..0d84fb418b8436537e6150f437b18d810de445f7 100644 --- a/entity/Email_entity/Email_entity.aod +++ b/entity/Email_entity/Email_entity.aod @@ -39,6 +39,10 @@ <name>DocumentTemplateTypeClassification_param</name> <valueProcess>%aditoprj%/entity/Email_entity/entityfields/documenttemplates/children/documenttemplatetypeclassification_param/valueProcess.js</valueProcess> </entityParameter> + <entityParameter> + <name>Language_param</name> + <valueProcess>%aditoprj%/entity/Email_entity/entityfields/documenttemplates/children/language_param/valueProcess.js</valueProcess> + </entityParameter> </children> </entityConsumer> <entityParameter> @@ -141,6 +145,10 @@ <expose v="true" /> <description></description> </entityParameter> + <entityParameter> + <name>Language_param</name> + <expose v="true" /> + </entityParameter> </entityFields> <recordContainers> <datalessRecordContainer> diff --git a/entity/Email_entity/entityfields/documenttemplates/children/language_param/valueProcess.js b/entity/Email_entity/entityfields/documenttemplates/children/language_param/valueProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..16f56787cf931a22d289ff5a7296861e82a454dd --- /dev/null +++ b/entity/Email_entity/entityfields/documenttemplates/children/language_param/valueProcess.js @@ -0,0 +1,4 @@ +import("system.vars"); +import("system.result"); + +result.string(vars.get("$param.Language_param")); \ No newline at end of file diff --git a/entity/Employee_entity/entityfields/setpassword/onActionProcess.js b/entity/Employee_entity/entityfields/setpassword/onActionProcess.js index 47df2ead20cc125d332d120712a5f30184b81b70..b7cc3e655c665bba7d0788061aceb7b61a8f27e5 100644 --- a/entity/Employee_entity/entityfields/setpassword/onActionProcess.js +++ b/entity/Employee_entity/entityfields/setpassword/onActionProcess.js @@ -1,7 +1,9 @@ +import("system.neonFilter"); import("system.vars"); import("system.neon"); var params = { "PasswordChange_param" : true }; -neon.openContext("Employee", "EmployeePassword_view", [vars.get("$field.UID")], neon.OPERATINGSTATE_EDIT, params); \ No newline at end of file +var recipe = neonFilter.createEntityRecordsRecipeBuilder().uidsIncludelist([vars.get("$field.UID")]).parameters(params); +neon.openContextWithRecipe("Employee", "EmployeePassword_view", recipe.toString(), neon.OPERATINGSTATE_EDIT); diff --git a/entity/ExportTemplatePlaceOfUse_entity/entityfields/placeofuse/stateProcess.js b/entity/ExportTemplatePlaceOfUse_entity/entityfields/placeofuse/stateProcess.js index 20fc8dccf50778351e6ffde02caa9518556780ea..32846813b0e6445814b913318bbaed8cb602da9b 100644 --- a/entity/ExportTemplatePlaceOfUse_entity/entityfields/placeofuse/stateProcess.js +++ b/entity/ExportTemplatePlaceOfUse_entity/entityfields/placeofuse/stateProcess.js @@ -7,7 +7,14 @@ let state; if (!Utils.isNullOrEmpty(vars.get("$field.EXPORTTEMPLATEPLACEOFUSE_ID")) || Utils.toBoolean(vars.get("$param.IsMainPlaceOfUse_param"))) { - state = neon.COMPONENTSTATE_EDITABLE; + if(vars.get("$sys.operatingstate") == neon.OPERATINGSTATE_NEW) + { + state = neon.COMPONENTSTATE_EDITABLE; + } + else + { + state = neon.COMPONENTSTATE_READONLY; + } } else if (vars.get("$sys.recordstate") == neon.OPERATINGSTATE_NEW) { diff --git a/entity/ExportTemplateSelection_entity/ExportTemplateSelection_entity.aod b/entity/ExportTemplateSelection_entity/ExportTemplateSelection_entity.aod index 7f406a333783ddf4fbdcdec44e903ae4d16f6345..bf8dd47ba444ef4c20a9700b27b7c9c0f59f17e7 100644 --- a/entity/ExportTemplateSelection_entity/ExportTemplateSelection_entity.aod +++ b/entity/ExportTemplateSelection_entity/ExportTemplateSelection_entity.aod @@ -88,7 +88,7 @@ <entityField> <name>exportCount</name> <documentation>%aditoprj%/entity/ExportTemplateSelection_entity/entityfields/exportcount/documentation.adoc</documentation> - <titleProcess>%aditoprj%/entity/ExportTemplateSelection_entity/entityfields/exportcount/titleProcess.js</titleProcess> + <title>Datasets are exported</title> <valueProcess>%aditoprj%/entity/ExportTemplateSelection_entity/entityfields/exportcount/valueProcess.js</valueProcess> </entityField> <entityProvider> diff --git a/entity/ExportTemplateSelection_entity/entityfields/charset/dropDownProcess.js b/entity/ExportTemplateSelection_entity/entityfields/charset/dropDownProcess.js index 3e47786c24e9684a064259923ad38c356aafaac2..cfcaa3d78104a3153b585886e07d2f50ff1397f0 100644 --- a/entity/ExportTemplateSelection_entity/entityfields/charset/dropDownProcess.js +++ b/entity/ExportTemplateSelection_entity/entityfields/charset/dropDownProcess.js @@ -1,3 +1,6 @@ import("system.result"); -result.object([["UTF-8", "UTF-8"]]); \ No newline at end of file +result.object([ + ["UTF-8", "UTF-8"], + ["ISO-8859-1", "ISO-8859-1"] +]); \ No newline at end of file diff --git a/entity/ExportTemplateSelection_entity/entityfields/exportcount/titleProcess.js b/entity/ExportTemplateSelection_entity/entityfields/exportcount/titleProcess.js deleted file mode 100644 index d12a65747fe928abcad84aab3f87c98917e61ade..0000000000000000000000000000000000000000 --- a/entity/ExportTemplateSelection_entity/entityfields/exportcount/titleProcess.js +++ /dev/null @@ -1,13 +0,0 @@ -import("system.translate"); -import("system.result"); -import("system.vars"); - -var comingFrom = vars.get("$field.comingfrom") -var res - -if(comingFrom == "Organisation") - res = translate.text("Organisations will be exported"); -else if(comingFrom == "Person") - res = translate.text("Contacts will be exported"); - -result.string(res) \ No newline at end of file diff --git a/entity/ExportTemplate_entity/ExportTemplate_entity.aod b/entity/ExportTemplate_entity/ExportTemplate_entity.aod index 4cea3664caaf81a16515e7a4967cde5cc2270001..b7e6a4514f4757c27c5f3a644d7c77ba45735870 100644 --- a/entity/ExportTemplate_entity/ExportTemplate_entity.aod +++ b/entity/ExportTemplate_entity/ExportTemplate_entity.aod @@ -35,20 +35,25 @@ <mandatory v="true" /> <dropDownProcess>%aditoprj%/entity/ExportTemplate_entity/entityfields/fieldseparator/dropDownProcess.js</dropDownProcess> <textInputAllowed v="true" /> + <valueProcess>%aditoprj%/entity/ExportTemplate_entity/entityfields/fieldseparator/valueProcess.js</valueProcess> </entityField> <entityField> <name>DATE_EDIT</name> <contentType>DATE</contentType> + <valueProcess>%aditoprj%/entity/ExportTemplate_entity/entityfields/date_edit/valueProcess.js</valueProcess> </entityField> <entityField> <name>DATE_NEW</name> <contentType>DATE</contentType> + <valueProcess>%aditoprj%/entity/ExportTemplate_entity/entityfields/date_new/valueProcess.js</valueProcess> </entityField> <entityField> <name>USER_EDIT</name> + <valueProcess>%aditoprj%/entity/ExportTemplate_entity/entityfields/user_edit/valueProcess.js</valueProcess> </entityField> <entityField> <name>USER_NEW</name> + <valueProcess>%aditoprj%/entity/ExportTemplate_entity/entityfields/user_new/valueProcess.js</valueProcess> </entityField> <entityField> <name>DESCRIPTION</name> @@ -99,6 +104,7 @@ <mandatory v="true" /> <dropDownProcess>%aditoprj%/entity/ExportTemplate_entity/entityfields/sentenceseparator/dropDownProcess.js</dropDownProcess> <textInputAllowed v="true" /> + <valueProcess>%aditoprj%/entity/ExportTemplate_entity/entityfields/sentenceseparator/valueProcess.js</valueProcess> </entityField> <entityField> <name>FIELDDELIMITER</name> @@ -106,6 +112,7 @@ <mandatory v="true" /> <dropDownProcess>%aditoprj%/entity/ExportTemplate_entity/entityfields/fielddelimiter/dropDownProcess.js</dropDownProcess> <textInputAllowed v="true" /> + <valueProcess>%aditoprj%/entity/ExportTemplate_entity/entityfields/fielddelimiter/valueProcess.js</valueProcess> </entityField> <entityField> <name>exportTemplateObjectType</name> @@ -176,6 +183,10 @@ </entityParameter> </children> </entityConsumer> + <entityField> + <name>PICTURE</name> + <contentType>IMAGE</contentType> + </entityField> </entityFields> <recordContainers> <dbRecordContainer> @@ -232,6 +243,10 @@ <name>FIELDDELIMITER.value</name> <recordfield>EXPORTTEMPLATE.FIELDDELIMITER</recordfield> </dbRecordFieldMapping> + <dbRecordFieldMapping> + <name>PICTURE.value</name> + <expression>%aditoprj%/entity/ExportTemplate_entity/recordcontainers/db/recordfieldmappings/picture.value/expression.js</expression> + </dbRecordFieldMapping> </recordFieldMappings> <linkInformation> <linkInformation> diff --git a/entity/ExportTemplate_entity/entityfields/date_edit/valueProcess.js b/entity/ExportTemplate_entity/entityfields/date_edit/valueProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..2af46a8e46789056c6c341a8e4e087f8e1edc0c4 --- /dev/null +++ b/entity/ExportTemplate_entity/entityfields/date_edit/valueProcess.js @@ -0,0 +1,8 @@ +import("system.result"); +import("system.neon"); +import("system.vars"); + +if(vars.get("$sys.recordstate") == neon.OPERATINGSTATE_EDIT) +{ + result.string(vars.get("$sys.date")); +} \ No newline at end of file diff --git a/entity/ExportTemplate_entity/entityfields/date_new/valueProcess.js b/entity/ExportTemplate_entity/entityfields/date_new/valueProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..d5cf2ff4f91546bf853125bec438493692a5e048 --- /dev/null +++ b/entity/ExportTemplate_entity/entityfields/date_new/valueProcess.js @@ -0,0 +1,8 @@ +import("system.result"); +import("system.neon"); +import("system.vars"); + +if(vars.get("$sys.recordstate") == neon.OPERATINGSTATE_NEW) +{ + result.string(vars.get("$sys.date")); +} \ No newline at end of file diff --git a/entity/ExportTemplate_entity/entityfields/fielddelimiter/dropDownProcess.js b/entity/ExportTemplate_entity/entityfields/fielddelimiter/dropDownProcess.js index 8303faa53dc834c54bd7613d1eb64532646e3f1c..09d3fc2ef05d826f34003bda6dcd94fcaafa9d3a 100644 --- a/entity/ExportTemplate_entity/entityfields/fielddelimiter/dropDownProcess.js +++ b/entity/ExportTemplate_entity/entityfields/fielddelimiter/dropDownProcess.js @@ -1,4 +1,4 @@ import("system.translate"); import("system.result"); -result.object([["quotation mark", translate.text("quotation mark")]]) \ No newline at end of file +result.object([["quotation mark", translate.text("quotation mark")]]); \ No newline at end of file diff --git a/entity/ExportTemplate_entity/entityfields/fielddelimiter/valueProcess.js b/entity/ExportTemplate_entity/entityfields/fielddelimiter/valueProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..daf82a82572adc065354d6728ee7048f49fc46bd --- /dev/null +++ b/entity/ExportTemplate_entity/entityfields/fielddelimiter/valueProcess.js @@ -0,0 +1,8 @@ +import("system.neon"); +import("system.result"); +import("system.vars"); + +if(vars.get("$sys.operatingstate") == neon.OPERATINGSTATE_NEW && vars.get("$this.value") == null) +{ + result.string("quotation mark"); +} \ No newline at end of file diff --git a/entity/ExportTemplate_entity/entityfields/fieldseparator/dropDownProcess.js b/entity/ExportTemplate_entity/entityfields/fieldseparator/dropDownProcess.js index e1ca4c50804399d2c12125b26af6f25a07424f5e..a1912df46d3e113bfdb0a08c8a8ae30d8d2a09b4 100644 --- a/entity/ExportTemplate_entity/entityfields/fieldseparator/dropDownProcess.js +++ b/entity/ExportTemplate_entity/entityfields/fieldseparator/dropDownProcess.js @@ -1,4 +1,4 @@ import("system.translate"); import("system.result"); -result.object([["tabulator", translate.text("tabulator")], ["semicolon", translate.text("semicolon")], ["comma", translate.text("comma")]]) \ No newline at end of file +result.object([["tabulator", translate.text("tabulator")], ["semicolon", translate.text("semicolon")], ["comma", translate.text("comma")]]); \ No newline at end of file diff --git a/entity/ExportTemplate_entity/entityfields/fieldseparator/valueProcess.js b/entity/ExportTemplate_entity/entityfields/fieldseparator/valueProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..2917e141f58c38592e9a1404777b5f423e03dc56 --- /dev/null +++ b/entity/ExportTemplate_entity/entityfields/fieldseparator/valueProcess.js @@ -0,0 +1,8 @@ +import("system.neon"); +import("system.result"); +import("system.vars"); + +if(vars.get("$sys.operatingstate") == neon.OPERATINGSTATE_NEW && vars.get("$this.value") == null) +{ + result.string("semicolon"); +} \ No newline at end of file diff --git a/entity/ExportTemplate_entity/entityfields/openadminview/onActionProcess.js b/entity/ExportTemplate_entity/entityfields/openadminview/onActionProcess.js index a19f58f080757e5cb8ad9f147beee77a0edb6258..0624e3ef8d1739ade06e8a018322dab9f9300c6a 100644 --- a/entity/ExportTemplate_entity/entityfields/openadminview/onActionProcess.js +++ b/entity/ExportTemplate_entity/entityfields/openadminview/onActionProcess.js @@ -4,6 +4,6 @@ import("Context_lib"); AdminViewUtils.open("EXPORTTEMPLATEID", [ ["DATE_NEW", vars.get("$field.DATE_NEW"), "DATE"], ["DATE_EDIT", vars.get("$field.DATE_EDIT"), "DATE"], - ["USER_NEW", vars.get("$field.USER_NEW"), "DATE"], - ["USER_EDIT", vars.get("$field.USER_EDIT"), "DATE"] + ["USER_NEW", vars.get("$field.USER_NEW")], + ["USER_EDIT", vars.get("$field.USER_EDIT")] ]); \ No newline at end of file diff --git a/entity/ExportTemplate_entity/entityfields/sentenceseparator/dropDownProcess.js b/entity/ExportTemplate_entity/entityfields/sentenceseparator/dropDownProcess.js index b955dae75d3b2e600f98bdae783e378cff727af3..6c3ae9492e370957282d8899073511a14a258af8 100644 --- a/entity/ExportTemplate_entity/entityfields/sentenceseparator/dropDownProcess.js +++ b/entity/ExportTemplate_entity/entityfields/sentenceseparator/dropDownProcess.js @@ -1,4 +1,4 @@ import("system.translate"); import("system.result"); -result.object([["carriage return and line feed", translate.text("carriage return and line feed")]]) \ No newline at end of file +result.object([["carriage return and line feed", translate.text("CRLF")]]); \ No newline at end of file diff --git a/entity/ExportTemplate_entity/entityfields/sentenceseparator/valueProcess.js b/entity/ExportTemplate_entity/entityfields/sentenceseparator/valueProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..5623689614c37a9d21a3c8a544fb42b3cc0b95f0 --- /dev/null +++ b/entity/ExportTemplate_entity/entityfields/sentenceseparator/valueProcess.js @@ -0,0 +1,8 @@ +import("system.neon"); +import("system.result"); +import("system.vars"); + +if(vars.get("$sys.operatingstate") == neon.OPERATINGSTATE_NEW && vars.get("$this.value") == null) +{ + result.string("carriage return and line feed"); +} \ No newline at end of file diff --git a/entity/ExportTemplate_entity/entityfields/user_edit/valueProcess.js b/entity/ExportTemplate_entity/entityfields/user_edit/valueProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..b874a7ac426b8e99383ac949299b9753e4951f2b --- /dev/null +++ b/entity/ExportTemplate_entity/entityfields/user_edit/valueProcess.js @@ -0,0 +1,8 @@ +import("system.result"); +import("system.neon"); +import("system.vars"); + +if(vars.get("$sys.recordstate") == neon.OPERATINGSTATE_EDIT) +{ + result.string(vars.get("$sys.user")); +} \ No newline at end of file diff --git a/entity/ExportTemplate_entity/entityfields/user_new/valueProcess.js b/entity/ExportTemplate_entity/entityfields/user_new/valueProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..3f8db68b950a0505d6179cb67c14dde624c45070 --- /dev/null +++ b/entity/ExportTemplate_entity/entityfields/user_new/valueProcess.js @@ -0,0 +1,8 @@ +import("system.result"); +import("system.neon"); +import("system.vars"); + +if(vars.get("$sys.recordstate") == neon.OPERATINGSTATE_NEW) +{ + result.string(vars.get("$sys.user")); +} \ No newline at end of file diff --git a/entity/ExportTemplate_entity/recordcontainers/db/conditionProcess.js b/entity/ExportTemplate_entity/recordcontainers/db/conditionProcess.js index 4d1fbcf2ebafabb46672f71de2ae2d541a8036bf..f59c7e774e9f7687e8fccf51f205c1e803fc3c08 100644 --- a/entity/ExportTemplate_entity/recordcontainers/db/conditionProcess.js +++ b/entity/ExportTemplate_entity/recordcontainers/db/conditionProcess.js @@ -1,5 +1,3 @@ -import("system.logging"); -import("system.vars"); import("system.vars"); import("system.result"); import("Sql_lib"); diff --git a/entity/ExportTemplate_entity/recordcontainers/db/recordfieldmappings/picture.value/expression.js b/entity/ExportTemplate_entity/recordcontainers/db/recordfieldmappings/picture.value/expression.js new file mode 100644 index 0000000000000000000000000000000000000000..14acf1fe3d9e87a942d70fa06d0a428e53677ac5 --- /dev/null +++ b/entity/ExportTemplate_entity/recordcontainers/db/recordfieldmappings/picture.value/expression.js @@ -0,0 +1,7 @@ +import("system.result"); +import("Sql_lib"); +var sqlMask = new SqlMaskingUtils(); + +var sql = sqlMask.concatenate(["'TEXT:'", "EXPORTTEMPLATE.TITLE"]); + +result.string(sql.toString()); \ No newline at end of file diff --git a/entity/Forecast_entity/Forecast_entity.aod b/entity/Forecast_entity/Forecast_entity.aod index a596f7e006fc85e895b9fa6c94b204c646819060..8d2b49c8a0d189a4e34a62dc62d6b112685946af 100644 --- a/entity/Forecast_entity/Forecast_entity.aod +++ b/entity/Forecast_entity/Forecast_entity.aod @@ -123,6 +123,10 @@ <name>KIND</name> <valueProcess>%aditoprj%/entity/Forecast_entity/entityfields/kind/valueProcess.js</valueProcess> </entityField> + <entityField> + <name>PICTURE</name> + <contentType>IMAGE</contentType> + </entityField> </entityFields> <recordContainers> <dbRecordContainer> @@ -177,6 +181,10 @@ <name>KIND.value</name> <recordfield>FORECAST.KIND</recordfield> </dbRecordFieldMapping> + <dbRecordFieldMapping> + <name>PICTURE.value</name> + <expression>%aditoprj%/entity/Forecast_entity/recordcontainers/db/recordfieldmappings/picture.value/expression.js</expression> + </dbRecordFieldMapping> </recordFieldMappings> <linkInformation> <linkInformation> diff --git a/entity/Forecast_entity/recordcontainers/db/recordfieldmappings/picture.value/expression.js b/entity/Forecast_entity/recordcontainers/db/recordfieldmappings/picture.value/expression.js new file mode 100644 index 0000000000000000000000000000000000000000..d8a3ca24105432603ceefbe1bfe222d1e9a94157 --- /dev/null +++ b/entity/Forecast_entity/recordcontainers/db/recordfieldmappings/picture.value/expression.js @@ -0,0 +1,10 @@ +import("KeywordRegistry_basic"); +import("Keyword_lib"); +import("system.result"); +import("Sql_lib"); + +var sqlMask = new SqlMaskingUtils(); + +var sql = sqlMask.concatenate(["'TEXT:'", KeywordUtils.getResolvedTitleSqlPart($KeywordRegistry.productGroupcode(), "FORECAST.GROUPCODE")]); + +result.string(sql.toString()); \ No newline at end of file diff --git a/entity/InterestLink_entity/InterestLink_entity.aod b/entity/InterestLink_entity/InterestLink_entity.aod index fc1a14a5db2223401cc69846c02ac96af8279a44..1ac1a55774b454a22e668a39ab4966681a519086 100644 --- a/entity/InterestLink_entity/InterestLink_entity.aod +++ b/entity/InterestLink_entity/InterestLink_entity.aod @@ -100,6 +100,10 @@ <iconId>VAADIN:CURLY_BRACKETS</iconId> <stateProcess>%aditoprj%/entity/InterestLink_entity/entityfields/openadminview/stateProcess.js</stateProcess> </entityActionField> + <entityField> + <name>PICTURE</name> + <contentType>IMAGE</contentType> + </entityField> </entityFields> <recordContainers> <dbRecordContainer> @@ -154,6 +158,10 @@ <name>DATE_NEW.value</name> <recordfield>INTERESTLINK.DATE_NEW</recordfield> </dbRecordFieldMapping> + <dbRecordFieldMapping> + <name>PICTURE.value</name> + <expression>%aditoprj%/entity/InterestLink_entity/recordcontainers/db/recordfieldmappings/picture.value/expression.js</expression> + </dbRecordFieldMapping> </recordFieldMappings> <linkInformation> <linkInformation> diff --git a/entity/InterestLink_entity/recordcontainers/db/recordfieldmappings/picture.value/expression.js b/entity/InterestLink_entity/recordcontainers/db/recordfieldmappings/picture.value/expression.js new file mode 100644 index 0000000000000000000000000000000000000000..96223909b223941d92d80f1c3fb20389d622b4a7 --- /dev/null +++ b/entity/InterestLink_entity/recordcontainers/db/recordfieldmappings/picture.value/expression.js @@ -0,0 +1,12 @@ +import("Product_lib"); +import("Person_lib"); +import("KeywordRegistry_basic"); +import("Keyword_lib"); +import("system.result"); +import("Sql_lib"); + +var sqlMask = new SqlMaskingUtils(); + +var sql = sqlMask.concatenate(["'TEXT:'", "INTEREST.TITLE"]); + +result.string(sql.toString()); \ No newline at end of file diff --git a/entity/KnowledgeDiscussion_entity/entityfields/edit_actiongroup/children/addanswer_action/onActionProcess.js b/entity/KnowledgeDiscussion_entity/entityfields/edit_actiongroup/children/addanswer_action/onActionProcess.js index 014090f103f492b497d4c4aec743a7108ad3eb0a..a08a8afa73601de44530b93d20cbe36a644b54df 100644 --- a/entity/KnowledgeDiscussion_entity/entityfields/edit_actiongroup/children/addanswer_action/onActionProcess.js +++ b/entity/KnowledgeDiscussion_entity/entityfields/edit_actiongroup/children/addanswer_action/onActionProcess.js @@ -1,9 +1,11 @@ +import("system.neonFilter"); import("system.vars"); import("system.neon"); var params = { - "KnowledgeId_param":vars.get("$param.KnowledgeId_param") - ,"ParentId_param":vars.get("$field.UID") -} + "KnowledgeId_param": vars.get("$param.KnowledgeId_param"), + "ParentId_param": vars.get("$field.UID") +}; -neon.openContext("KnowledgeDiscussion", "KnowledgeDiscussionEdit_view", null, neon.OPERATINGSTATE_NEW, params); \ No newline at end of file +var recipe = neonFilter.createEntityRecordsRecipeBuilder().parameters(params).toString(); +neon.openContextWithRecipe("KnowledgeDiscussion", "KnowledgeDiscussionEdit_view", recipe, neon.OPERATINGSTATE_NEW); diff --git a/entity/LeadLog_entity/grantDeleteProcess.js b/entity/LeadLog_entity/grantDeleteProcess.js index cea08cc1f625bdd4b38ced32dffe9b979c2a0c5b..847bb1a9a29d3af18c555e9c31207b7a5dec396c 100644 --- a/entity/LeadLog_entity/grantDeleteProcess.js +++ b/entity/LeadLog_entity/grantDeleteProcess.js @@ -1,5 +1,6 @@ import("system.vars"); import("system.result"); +import("Entity_lib"); var leadLogId = vars.get("$field.LEADLOGID"); diff --git a/entity/Leadimport_entity/entityfields/uploadnewfile/onActionProcess.js b/entity/Leadimport_entity/entityfields/uploadnewfile/onActionProcess.js index e62547450131766e5bbb2a24282d84a1e4c6ad74..25be5322c1547ccea86bffd9eac8ca37670b88c7 100644 --- a/entity/Leadimport_entity/entityfields/uploadnewfile/onActionProcess.js +++ b/entity/Leadimport_entity/entityfields/uploadnewfile/onActionProcess.js @@ -1,4 +1,6 @@ +import("system.neonFilter"); import("system.neon"); import("system.vars"); -neon.openContext("Leadimport", "LeadimportDocEdit_view", [vars.getString("$field.LEADIMPORTID")], neon.OPERATINGSTATE_EDIT, []); \ No newline at end of file +var recipe = neonFilter.createEntityRecordsRecipeBuilder().uidsIncludelist([vars.getString("$field.LEADIMPORTID")]); +neon.openContextWithRecipe("Leadimport", "LeadimportDocEdit_view", recipe.toString(), neon.OPERATINGSTATE_EDIT); diff --git a/entity/Letter_entity/entityfields/downloadletterandcreateactivity/onActionProcess.js b/entity/Letter_entity/entityfields/downloadletterandcreateactivity/onActionProcess.js index 69b7b7b8cb88c489754264203262574b6ff4e2be..37a8bfcce2e832169e1e3891508da61749cbfd5c 100644 --- a/entity/Letter_entity/entityfields/downloadletterandcreateactivity/onActionProcess.js +++ b/entity/Letter_entity/entityfields/downloadletterandcreateactivity/onActionProcess.js @@ -1,3 +1,4 @@ +import("Sql_lib"); import("system.translate"); import("Contact_lib"); import("ActivityTask_lib"); @@ -21,7 +22,10 @@ if (template) return Object.assign(new Placeholder(), placeholder); }); } - var content = template.setOptions({base64 : true}).getReplacedContentByContactId(contactId, additionalPlaceholders); + + var locale = newSelect("ISOLANGUAGE").from("CONTACT").where("CONTACT.CONTACTID", contactId).cell(); + + var content = template.setOptions({base64 : true}).getReplacedContentByContactId(contactId, additionalPlaceholders, locale); if (template.type) neon.download(content, template.filename); diff --git a/entity/Letter_entity/onValidation.js b/entity/Letter_entity/onValidation.js index 083fd4dbe6888e3bd8696dea5f480a2a5dfd34b7..748998e9dd9cb1465d163bd71ac2f95330d0ab4b 100644 --- a/entity/Letter_entity/onValidation.js +++ b/entity/Letter_entity/onValidation.js @@ -1,8 +1,27 @@ import("system.vars"); import("system.translate"); import("system.result"); +import("DocumentTemplate_lib"); -if (!vars.get("$field.bindata") && !vars.get("$field.DOCUMENT_TEMPLATE")) +var templateId = vars.get("$field.DOCUMENT_TEMPLATE"); +var bindata = vars.get("$field.bindata"); +var upload = new FileUpload(bindata); + +var template; +if (upload.isFilled()) +{ + template = DocumentTemplate.fromUpload(upload); +} +else if (templateId) +{ + template = DocumentTemplateUtils.getTemplate(templateId); +} + +if (!bindata && !templateId) { result.string(translate.text("Please select a documenttemplate or upload a new file.")) +} +else if (![DocumentTemplate.types.ODT, DocumentTemplate.types.DOCM, DocumentTemplate.types.DOCX].includes(template.type)) +{ + result.string(translate.text("Only .odt, .docx and .docm files are supported for letters.")) } \ No newline at end of file diff --git a/entity/LogHistory_entity/recordcontainers/jdito/contentProcess.js b/entity/LogHistory_entity/recordcontainers/jdito/contentProcess.js index f4eec06bec0d8714499aea1023fcc5d2e67011f0..a5ea37fe7824a0151d27ed9092a286d03c6d1992 100644 --- a/entity/LogHistory_entity/recordcontainers/jdito/contentProcess.js +++ b/entity/LogHistory_entity/recordcontainers/jdito/contentProcess.js @@ -22,7 +22,7 @@ if (vars.exists("$local.idvalues")) { var groupingInfo = JSON.parse(semiId[0]); logSelect.and("AB_LOGHISTORY.USER_NEW", groupingInfo.u); - var dateFilterValue = datetime.toLong(groupingInfo.d, "yyyy-MM-dd HH:mm", "UTC"); // #1076044 set tz to prevent time gaps. + var dateFilterValue = datetime.toLong(groupingInfo.d, "yyyy-MM-dd HH:mm"); // #1076044 set tz to prevent time gaps. //UTC removed to get the dataset logSelect.and("AB_LOGHISTORY.DATE_NEW", dateFilterValue, SqlBuilder.GREATER_OR_EQUAL()); logSelect.and("AB_LOGHISTORY.DATE_NEW", eMath.addInt(dateFilterValue, datetime.ONE_MINUTE), SqlBuilder.LESS()); } diff --git a/entity/MSTeamsMessage_entity/entityfields/importmessages/onActionProcess.js b/entity/MSTeamsMessage_entity/entityfields/importmessages/onActionProcess.js index a5650f2a632efa216c3877c4e2ce4a5544a1c95c..ea2a75a0ab97118989292ac4a4689cf109d8cc8d 100644 --- a/entity/MSTeamsMessage_entity/entityfields/importmessages/onActionProcess.js +++ b/entity/MSTeamsMessage_entity/entityfields/importmessages/onActionProcess.js @@ -1,3 +1,4 @@ +import("system.neonFilter"); import("system.text"); import("system.translate"); import("Sql_lib"); @@ -25,10 +26,11 @@ var links = newSelect(["OBJECT_TYPE", "OBJECT_ROWID"]) var teamName = ContextUtils.loadContentTitle("MSTTeam_entity", vars.get("$param.TeamId_param")); var channelName = ContextUtils.loadContentTitle("MSTeamsChannel_entity", vars.get("$param.Channel_param"), undefined, undefined, {TeamId_param: vars.get("$param.TeamId_param")}); -neon.openContext("Activity", "ActivityEdit_view", null, neon.OPERATINGSTATE_NEW, { +var recipe = neonFilter.createEntityRecordsRecipeBuilder().parameters({ Info_param: description, PresetLinks_param: JSON.stringify(links), Direction_param: $KeywordRegistry.activityDirection$internal(), Subject_param: translate.text("MS-Teams Message") + " - " + teamName + " - " + channelName, Category_param: $KeywordRegistry.activityCategory$mstMessage() -}); +}).toString(); +neon.openContextWithRecipe("Activity", "ActivityEdit_view", recipe, neon.OPERATINGSTATE_NEW); diff --git a/entity/MailSignatureDefaultSignature_entity/entityfields/save/onActionProcess.js b/entity/MailSignatureDefaultSignature_entity/entityfields/save/onActionProcess.js index 382c10456c738742114270a284dc2da6e6c258f6..1e478c101b1022947c34b913c2f0ea06ab07ac30 100644 --- a/entity/MailSignatureDefaultSignature_entity/entityfields/save/onActionProcess.js +++ b/entity/MailSignatureDefaultSignature_entity/entityfields/save/onActionProcess.js @@ -1,3 +1,4 @@ +import("system.neonFilter"); import("system.neon"); import("Sql_lib"); import("system.vars"); @@ -19,4 +20,5 @@ newWhere("MAILSIGNATURE.MAILSIGNATUREID", newDefaultSignature) }); vars.set("$global.default_mailsignature", 1); -neon.openContext("Inbox", "InboxMain_view", [vars.get("$param.InboxId_param")], neon.OPERATINGSTATE_VIEW, null); \ No newline at end of file +var recipe = neonFilter.createEntityRecordsRecipeBuilder().uidsIncludelist([vars.get("$param.InboxId_param")]); +neon.openContextWithRecipe("Inbox", "InboxMain_view", recipe.toString(), neon.OPERATINGSTATE_VIEW); diff --git a/entity/MailSignature_entity/entityfields/setdefaultsignature/children/setasdefaultsignature/onActionProcess.js b/entity/MailSignature_entity/entityfields/setdefaultsignature/children/setasdefaultsignature/onActionProcess.js index c72a4e8cab110493c0c45c6008abecdae4276409..e55d64a7635dcadce0e0bcb2f4179a4aa7a4443b 100644 --- a/entity/MailSignature_entity/entityfields/setdefaultsignature/children/setasdefaultsignature/onActionProcess.js +++ b/entity/MailSignature_entity/entityfields/setdefaultsignature/children/setasdefaultsignature/onActionProcess.js @@ -1,8 +1,10 @@ +import("system.neonFilter"); import("system.vars"); import("system.neon"); var params = { - "InboxId_param" : vars.get("$param.InboxId_param") -} + "InboxId_param": vars.get("$param.InboxId_param") +}; -neon.openContext("MailSignatureDefaultSignature", "MailSignatureDefaultSignatureEdit_view", null, neon.OPERATINGSTATE_VIEW, params); \ No newline at end of file +var recipe = neonFilter.createEntityRecordsRecipeBuilder().parameters(params).toString(); +neon.openContextWithRecipe("MailSignatureDefaultSignature", "MailSignatureDefaultSignatureEdit_view", recipe, neon.OPERATINGSTATE_VIEW); diff --git a/entity/Member_entity/entityfields/msteamsactiongroup/children/chooseteam/onActionProcess.js b/entity/Member_entity/entityfields/msteamsactiongroup/children/chooseteam/onActionProcess.js index b6ffb62af2e93df3b267c9b5f695aeb6282624db..bcb1064c41b3c8e91f04be9aadafaf2ac43b1a91 100644 --- a/entity/Member_entity/entityfields/msteamsactiongroup/children/chooseteam/onActionProcess.js +++ b/entity/Member_entity/entityfields/msteamsactiongroup/children/chooseteam/onActionProcess.js @@ -1,9 +1,11 @@ +import("system.neonFilter"); import("system.neon"); import("system.vars"); import("AttributeRegistry_basic"); -neon.openContext("AttributeRelation", null, null, neon.OPERATINGSTATE_NEW, { +var recipe = neonFilter.createEntityRecordsRecipeBuilder().parameters({ AttributeId_param: $AttributeRegistry.mstTeam(), ObjectType_param: vars.get("$param.ObjectType_param"), ObjectRowId_param: vars.get("$param.ObjectRowId_param") -}); +}).toString(); +neon.openContextWithRecipe("AttributeRelation", null, recipe, neon.OPERATINGSTATE_NEW); diff --git a/entity/Member_entity/entityfields/msteamsactiongroup/children/createteam/onActionProcess.js b/entity/Member_entity/entityfields/msteamsactiongroup/children/createteam/onActionProcess.js index ed5f6c0ceae9984aca8f2eaa9daa7797247da83c..8876f778c34d6c9c15c56b6b7af3a14697ab0e60 100644 --- a/entity/Member_entity/entityfields/msteamsactiongroup/children/createteam/onActionProcess.js +++ b/entity/Member_entity/entityfields/msteamsactiongroup/children/createteam/onActionProcess.js @@ -1,3 +1,4 @@ +import("system.neonFilter"); import("system.vars"); import("system.neon"); import("system.teams"); @@ -22,4 +23,5 @@ if (objectType === "Salesproject") params["Description_param"] = description; } -neon.openContext("MSTTeam", null, null, neon.OPERATINGSTATE_NEW, params); +var recipe = neonFilter.createEntityRecordsRecipeBuilder().parameters(params).toString(); +neon.openContextWithRecipe("MSTTeam", null, recipe, neon.OPERATINGSTATE_NEW); diff --git a/entity/Member_entity/entityfields/msteamsactiongroup/children/editteam/onActionProcess.js b/entity/Member_entity/entityfields/msteamsactiongroup/children/editteam/onActionProcess.js index 746823a3b6e4b00635d7b22610a74dae24415986..ac92a7510e27089fff1f59f7ae53a44671796c65 100644 --- a/entity/Member_entity/entityfields/msteamsactiongroup/children/editteam/onActionProcess.js +++ b/entity/Member_entity/entityfields/msteamsactiongroup/children/editteam/onActionProcess.js @@ -1,8 +1,11 @@ +import("system.neonFilter"); import("system.vars"); import("system.neon"); -neon.openContext("MSTTeam", null, [vars.get("$param.MSTTeamId_param")], neon.OPERATINGSTATE_EDIT, { - "ObjectRowId_param": vars.get("$param.ObjectRowId_param"), - "ObjectType_param": vars.get("$param.ObjectType_param"), - "ContactIds_param": vars.get("$param.ContactIds_param") -}); +var recipe = neonFilter.createEntityRecordsRecipeBuilder() + .uidsIncludelist([vars.get("$param.MSTTeamId_param")]).parameters({ + "ObjectRowId_param": vars.get("$param.ObjectRowId_param"), + "ObjectType_param": vars.get("$param.ObjectType_param"), + "ContactIds_param": vars.get("$param.ContactIds_param") + }).toString(); +neon.openContextWithRecipe("MSTTeam", null, recipe, neon.OPERATINGSTATE_EDIT); diff --git a/entity/MosaicoTemplate_entity/entityfields/copytemplate/onActionProcess.js b/entity/MosaicoTemplate_entity/entityfields/copytemplate/onActionProcess.js index 7a09b1146c2906901c2e224d1679ef944da9c171..3a0256f8d48d396eee13205c1f9ce9634c2494b2 100644 --- a/entity/MosaicoTemplate_entity/entityfields/copytemplate/onActionProcess.js +++ b/entity/MosaicoTemplate_entity/entityfields/copytemplate/onActionProcess.js @@ -1,7 +1,9 @@ +import("system.neonFilter"); import("system.vars"); import("system.neon"); var params = { - "CopyMosaicoTemplateIdParam" : vars.get("$field.MOSAICOTEMPLATEID") + "CopyMosaicoTemplateIdParam": vars.get("$field.MOSAICOTEMPLATEID") }; -neon.openContext("MosaicoTemplate", null, null, neon.OPERATINGSTATE_NEW, params); \ No newline at end of file +var recipe = neonFilter.createEntityRecordsRecipeBuilder().parameters(params).toString(); +neon.openContextWithRecipe("MosaicoTemplate", null, recipe, neon.OPERATINGSTATE_NEW); diff --git a/entity/MosaicoTemplate_entity/entityfields/newdocumenttemplate/onActionProcess.js b/entity/MosaicoTemplate_entity/entityfields/newdocumenttemplate/onActionProcess.js index 83ccf0f0600933f88a9acef672285f3d705f648b..a7830aa48c2bed9bb3c3e72798b8802b8deb1b7a 100644 --- a/entity/MosaicoTemplate_entity/entityfields/newdocumenttemplate/onActionProcess.js +++ b/entity/MosaicoTemplate_entity/entityfields/newdocumenttemplate/onActionProcess.js @@ -1,7 +1,9 @@ +import("system.neonFilter"); import("system.vars"); import("system.neon"); var params = { - "CreateFromMosaicoTemplateId_param" : vars.get("$field.MOSAICOTEMPLATEID") + "CreateFromMosaicoTemplateId_param": vars.get("$field.MOSAICOTEMPLATEID") }; -neon.openContext("DocumentTemplate", null, null, neon.OPERATINGSTATE_NEW, params); \ No newline at end of file +var recipe = neonFilter.createEntityRecordsRecipeBuilder().parameters(params).toString(); +neon.openContextWithRecipe("DocumentTemplate", null, recipe, neon.OPERATINGSTATE_NEW); diff --git a/entity/ObjectTree_entity/ObjectTree_entity.aod b/entity/ObjectTree_entity/ObjectTree_entity.aod index cca5e7ad546e1b9231f2ee62e6735e6e95172217..118d04bb299dddbab91daaa0078b1b5440bcce63 100644 --- a/entity/ObjectTree_entity/ObjectTree_entity.aod +++ b/entity/ObjectTree_entity/ObjectTree_entity.aod @@ -136,9 +136,11 @@ <children> <entityActionField> <name>insert</name> + <title>Create subordinate relationship</title> <onActionProcess>%aditoprj%/entity/ObjectTree_entity/entityfields/alter/children/insert/onActionProcess.js</onActionProcess> <iconId>VAADIN:FILE_TREE_SMALL</iconId> <stateProcess>%aditoprj%/entity/ObjectTree_entity/entityfields/alter/children/insert/stateProcess.js</stateProcess> + <tooltip>Create subordinate relationship</tooltip> </entityActionField> </children> </entityActionGroup> diff --git a/entity/ObjectTree_entity/entityfields/alter/children/insert/onActionProcess.js b/entity/ObjectTree_entity/entityfields/alter/children/insert/onActionProcess.js index d71f4187a27a06b8cd729143f27d7c6ecab4ee3a..5a10534f57b48b4fba2481d7cf1a2eab21865bb4 100644 --- a/entity/ObjectTree_entity/entityfields/alter/children/insert/onActionProcess.js +++ b/entity/ObjectTree_entity/entityfields/alter/children/insert/onActionProcess.js @@ -1,3 +1,4 @@ +import("system.neonFilter"); import("system.result"); import("system.neon"); import("system.vars"); @@ -28,6 +29,7 @@ if (vars.exists("$sys.selection") && vars.getString("$sys.selection")) "RelationTypes_param" : vars.get("$field.OBJECTRELATIONTYPEID") }; - neon.openContext("ObjectTree", "ObjectTreeEdit_view", null, neon.OPERATINGSTATE_NEW, params); + var recipe = neonFilter.createEntityRecordsRecipeBuilder().parameters(params).toString(); + neon.openContextWithRecipe("ObjectTree", "ObjectTreeEdit_view", recipe, neon.OPERATINGSTATE_NEW); } -} \ No newline at end of file +} diff --git a/entity/ObservationMultiple_entity/ObservationMultiple_entity.aod b/entity/ObservationMultiple_entity/ObservationMultiple_entity.aod index d3fce45464247d767d69159bd3f33c800c9285e4..724f631cf99fc506c1cb02e4cbf35578e6703fb6 100644 --- a/entity/ObservationMultiple_entity/ObservationMultiple_entity.aod +++ b/entity/ObservationMultiple_entity/ObservationMultiple_entity.aod @@ -87,6 +87,7 @@ <entityActionField> <name>addObservations</name> <onActionProcess>%aditoprj%/entity/ObservationMultiple_entity/entityfields/addobservations/onActionProcess.js</onActionProcess> + <iconId>NEON:OBSERVE</iconId> <titleProcess>%aditoprj%/entity/ObservationMultiple_entity/entityfields/addobservations/titleProcess.js</titleProcess> </entityActionField> <entityParameter> diff --git a/entity/Observation_entity/entityfields/filteractions/children/adddependency/onActionProcess.js b/entity/Observation_entity/entityfields/filteractions/children/adddependency/onActionProcess.js index 3f1d0c11b35d36ecaf864732aac6a84ee3dc449c..f7b09e4835755a34d9e9d6ed8ab28695690ef4d4 100644 --- a/entity/Observation_entity/entityfields/filteractions/children/adddependency/onActionProcess.js +++ b/entity/Observation_entity/entityfields/filteractions/children/adddependency/onActionProcess.js @@ -1,3 +1,4 @@ +import("system.neonFilter"); import("system.vars"); import("system.entities"); import("Observation_lib"); @@ -5,9 +6,11 @@ import("system.neon"); let selectedUIDs = vars.get("$sys.selection"); -if (selectedUIDs.length === 1){ - let params = { - "Observation_id_param" : selectedUIDs[0] - } - neon.openContext("Observation", "ObservationEdit_view", null, neon.OPERATINGSTATE_NEW, params); -} \ No newline at end of file +if (selectedUIDs.length === 1) +{ + var params = { + "Observation_id_param": selectedUIDs[0] + }; + var recipe = neonFilter.createEntityRecordsRecipeBuilder().parameters(params).toString(); + neon.openContextWithRecipe("Observation", "ObservationEdit_view", recipe, neon.OPERATINGSTATE_NEW); +} diff --git a/entity/Offer_entity/entityfields/approveoffer/onActionProcess.js b/entity/Offer_entity/entityfields/approveoffer/onActionProcess.js index 4c386d3779ff76da939bd8e54d01b4d3f1c662a8..03460b24e13c10ff2d3d3fb35b3862e2c3ddf5ad 100644 --- a/entity/Offer_entity/entityfields/approveoffer/onActionProcess.js +++ b/entity/Offer_entity/entityfields/approveoffer/onActionProcess.js @@ -1,3 +1,4 @@ +import("system.neonFilter"); import("Employee_lib"); import("Workflow_lib"); import("system.neon"); @@ -10,4 +11,5 @@ var taskId = WorkflowUtils.getTaskId(offerId, ContextUtils.getCurrentContextId() newWhere("OFFER.OFFERID", offerId).updateFields({"ACTIONUSER" : EmployeeUtils.getCurrentContactId()}); -neon.openContext("WorkflowTask", "WorkflowTaskForm_view", [taskId], neon.OPERATINGSTATE_EDIT, null); \ No newline at end of file +var recipe = neonFilter.createEntityRecordsRecipeBuilder().uidsIncludelist([taskId]).toString(); +neon.openContextWithRecipe("WorkflowTask", "WorkflowTaskForm_view", recipe, neon.OPERATINGSTATE_EDIT); diff --git a/entity/Offer_entity/entityfields/newofferversion/onActionProcess.js b/entity/Offer_entity/entityfields/newofferversion/onActionProcess.js index 02f67ef9c37049f446df6879107ff67b6032e91e..8cacf0dd0fa4ffc1be9acc65a344dd337255c9a0 100644 --- a/entity/Offer_entity/entityfields/newofferversion/onActionProcess.js +++ b/entity/Offer_entity/entityfields/newofferversion/onActionProcess.js @@ -1,3 +1,4 @@ +import("system.neonFilter"); import("system.vars"); import("system.neon"); import("Offer_lib"); @@ -17,5 +18,6 @@ var params = { "OfferDeliveryTerm_param" : vars.get("$field.DELIVERYTERMS"), "OfferPaymentTerm_param" : vars.get("$field.PAYMENTTERMS"), "Discount_param": vars.get("$field.DISCOUNT") -} -neon.openContext("Offer", null, null, neon.OPERATINGSTATE_NEW, params); \ No newline at end of file +}; +var recipe = neonFilter.createEntityRecordsRecipeBuilder().parameters(params).toString(); +neon.openContextWithRecipe("Offer", null, recipe, neon.OPERATINGSTATE_NEW); diff --git a/entity/Offeritem_entity/Offeritem_entity.aod b/entity/Offeritem_entity/Offeritem_entity.aod index 5657ac3d3c0da879e05ed500d8778e94c90611df..87a0d3f6cae67df525e62259afd9f120e5d84ef5 100644 --- a/entity/Offeritem_entity/Offeritem_entity.aod +++ b/entity/Offeritem_entity/Offeritem_entity.aod @@ -296,6 +296,10 @@ <state>READONLY</state> <valueProcess>%aditoprj%/entity/Offeritem_entity/entityfields/currency/valueProcess.js</valueProcess> </entityField> + <entityField> + <name>PICTURE</name> + <contentType>IMAGE</contentType> + </entityField> </entityFields> <recordContainers> <dbRecordContainer> @@ -408,6 +412,10 @@ <name>DISCOUNT.displayValue</name> <expression>%aditoprj%/entity/Offeritem_entity/recordcontainers/db/recordfieldmappings/discount.displayvalue/expression.js</expression> </dbRecordFieldMapping> + <dbRecordFieldMapping> + <name>PICTURE.value</name> + <expression>%aditoprj%/entity/Offeritem_entity/recordcontainers/db/recordfieldmappings/picture.value/expression.js</expression> + </dbRecordFieldMapping> </recordFieldMappings> <linkInformation> <linkInformation> diff --git a/entity/Offeritem_entity/entityfields/product_id/displayValueProcess.js b/entity/Offeritem_entity/entityfields/product_id/displayValueProcess.js index e10bbc483b4488b6efb2acbc66f9d89aac82e431..34b95afc4d4ac6372590ed4ff00a350dee2fd895 100644 --- a/entity/Offeritem_entity/entityfields/product_id/displayValueProcess.js +++ b/entity/Offeritem_entity/entityfields/product_id/displayValueProcess.js @@ -1,6 +1,10 @@ +import("system.neon"); +import("Product_lib"); import("system.vars"); import("system.result"); import("Sql_lib"); -if(vars.get("$field.PRODUCT_ID")) - result.string(newSelect("PRODUCT.PRODUCTNAME").from("PRODUCT").whereIfSet("PRODUCT.PRODUCTID", vars.get("$field.PRODUCT_ID")).cell()); \ No newline at end of file +if(vars.get("$field.PRODUCT_ID") && vars.get("$sys.viewmode") != neon.FRAME_VIEWMODE_TABLE) +{ + result.string(ProductUtils.getProductName(vars.get("$field.PRODUCT_ID"))); +} \ No newline at end of file diff --git a/entity/Offeritem_entity/recordcontainers/db/recordfieldmappings/picture.value/expression.js b/entity/Offeritem_entity/recordcontainers/db/recordfieldmappings/picture.value/expression.js new file mode 100644 index 0000000000000000000000000000000000000000..266ce0e685b3f00c33ab84a795cbf3e8dabc4765 --- /dev/null +++ b/entity/Offeritem_entity/recordcontainers/db/recordfieldmappings/picture.value/expression.js @@ -0,0 +1,12 @@ +import("Product_lib"); +import("Person_lib"); +import("KeywordRegistry_basic"); +import("Keyword_lib"); +import("system.result"); +import("Sql_lib"); + +var sqlMask = new SqlMaskingUtils(); + +var sql = sqlMask.concatenate(["'TEXT:'", "(" + ProductUtils.getProductNameSubSql("OFFERITEM.PRODUCT_ID") + ")"]); + +result.string(sql.toString()); \ No newline at end of file diff --git a/entity/Offeritem_entity/recordcontainers/db/recordfieldmappings/product_id.displayvalue/expression.js b/entity/Offeritem_entity/recordcontainers/db/recordfieldmappings/product_id.displayvalue/expression.js index 505fda0b8e840a2c32054647dcc52469f8fc199d..a3c7e1a4b082e21f94f25a8af225a5a526c38bdc 100644 --- a/entity/Offeritem_entity/recordcontainers/db/recordfieldmappings/product_id.displayvalue/expression.js +++ b/entity/Offeritem_entity/recordcontainers/db/recordfieldmappings/product_id.displayvalue/expression.js @@ -1,5 +1,6 @@ +import("Product_lib"); import("system.vars"); import("system.result"); // TODO: remove when #title is used as display value for lookups -result.string("(select PRODUCT.PRODUCTNAME from PRODUCT where OFFERITEM.PRODUCT_ID = PRODUCT.PRODUCTID)"); \ No newline at end of file +result.string(ProductUtils.getProductNameSubSql("OFFERITEM.PRODUCT_ID")); \ No newline at end of file diff --git a/entity/Order_entity/entityfields/setdunning/onActionProcess.js b/entity/Order_entity/entityfields/setdunning/onActionProcess.js index b105ff8dff23e2633bd9e529262c3f6d6f06d650..19c4586e47e2abbc1bc0eedf5d49647ffbefda0b 100644 --- a/entity/Order_entity/entityfields/setdunning/onActionProcess.js +++ b/entity/Order_entity/entityfields/setdunning/onActionProcess.js @@ -1,4 +1,6 @@ +import("system.neonFilter"); import("system.vars"); import("system.neon"); -neon.openContext("Order", "OrderDunning_view", [vars.get("$field.SALESORDERID")], neon.OPERATINGSTATE_EDIT, null); +var recipe = neonFilter.createEntityRecordsRecipeBuilder().uidsIncludelist([vars.get("$field.SALESORDERID")]); +neon.openContextWithRecipe("Order", "OrderDunning_view", recipe.toString(), neon.OPERATINGSTATE_EDIT); diff --git a/entity/Order_entity/entityfields/setpaid/onActionProcess.js b/entity/Order_entity/entityfields/setpaid/onActionProcess.js index 0c8acb980e727787e348ed099785198288ecbcbb..91248113088568304faff057809c2264a87cebd9 100644 --- a/entity/Order_entity/entityfields/setpaid/onActionProcess.js +++ b/entity/Order_entity/entityfields/setpaid/onActionProcess.js @@ -1,4 +1,6 @@ +import("system.neonFilter"); import("system.vars"); import("system.neon"); -neon.openContext("Order", "OrderPaid_view", [vars.get("$field.SALESORDERID")], neon.OPERATINGSTATE_EDIT, null); +var recipe = neonFilter.createEntityRecordsRecipeBuilder().uidsIncludelist([vars.get("$field.SALESORDERID")]); +neon.openContextWithRecipe("Order", "OrderPaid_view", recipe.toString(), neon.OPERATINGSTATE_EDIT); diff --git a/entity/Orderitem_entity/Orderitem_entity.aod b/entity/Orderitem_entity/Orderitem_entity.aod index 2ba72ab532b66adfcc197f4986d6b9ffa780ba08..b6f5ec9513c092d2287bed81eb534a94eca65062 100644 --- a/entity/Orderitem_entity/Orderitem_entity.aod +++ b/entity/Orderitem_entity/Orderitem_entity.aod @@ -278,6 +278,10 @@ <state>READONLY</state> <valueProcess>%aditoprj%/entity/Orderitem_entity/entityfields/currency/valueProcess.js</valueProcess> </entityField> + <entityField> + <name>PICTURE</name> + <contentType>IMAGE</contentType> + </entityField> </entityFields> <recordContainers> <dbRecordContainer> @@ -368,6 +372,10 @@ <isFilterable v="true" /> <isLookupFilter v="true" /> </dbRecordFieldMapping> + <dbRecordFieldMapping> + <name>PICTURE.value</name> + <expression>%aditoprj%/entity/Orderitem_entity/recordcontainers/db/recordfieldmappings/picture.value/expression.js</expression> + </dbRecordFieldMapping> </recordFieldMappings> <linkInformation> <linkInformation> diff --git a/entity/Orderitem_entity/entityfields/product_id/displayValueProcess.js b/entity/Orderitem_entity/entityfields/product_id/displayValueProcess.js index e10bbc483b4488b6efb2acbc66f9d89aac82e431..99ef423450f5d49e1c13a16fc2aa5c6ad7814b90 100644 --- a/entity/Orderitem_entity/entityfields/product_id/displayValueProcess.js +++ b/entity/Orderitem_entity/entityfields/product_id/displayValueProcess.js @@ -1,6 +1,10 @@ +import("Product_lib"); +import("system.neon"); import("system.vars"); import("system.result"); import("Sql_lib"); -if(vars.get("$field.PRODUCT_ID")) - result.string(newSelect("PRODUCT.PRODUCTNAME").from("PRODUCT").whereIfSet("PRODUCT.PRODUCTID", vars.get("$field.PRODUCT_ID")).cell()); \ No newline at end of file +if(vars.get("$field.PRODUCT_ID") && vars.get("$sys.viewmode") != neon.FRAME_VIEWMODE_TABLE) +{ + result.string(ProductUtils.getProductName(vars.get("$field.PRODUCT_ID"))); +} \ No newline at end of file diff --git a/entity/Orderitem_entity/recordcontainers/db/recordfieldmappings/picture.value/expression.js b/entity/Orderitem_entity/recordcontainers/db/recordfieldmappings/picture.value/expression.js new file mode 100644 index 0000000000000000000000000000000000000000..75190112fb7b4835ec6e139787a334eddb629e78 --- /dev/null +++ b/entity/Orderitem_entity/recordcontainers/db/recordfieldmappings/picture.value/expression.js @@ -0,0 +1,12 @@ +import("Product_lib"); +import("Person_lib"); +import("KeywordRegistry_basic"); +import("Keyword_lib"); +import("system.result"); +import("Sql_lib"); + +var sqlMask = new SqlMaskingUtils(); + +var sql = sqlMask.concatenate(["'TEXT:'", "(" + ProductUtils.getProductNameSubSql("SALESORDERITEM.PRODUCT_ID") + ")"]); + +result.string(sql.toString()); \ No newline at end of file diff --git a/entity/Orderitem_entity/recordcontainers/db/recordfieldmappings/product_id.displayvalue/expression.js b/entity/Orderitem_entity/recordcontainers/db/recordfieldmappings/product_id.displayvalue/expression.js index c356272a55066e5913df7b5cbaa668d875d88983..60e5f9a4434937d2d26444ca803b138d12a14961 100644 --- a/entity/Orderitem_entity/recordcontainers/db/recordfieldmappings/product_id.displayvalue/expression.js +++ b/entity/Orderitem_entity/recordcontainers/db/recordfieldmappings/product_id.displayvalue/expression.js @@ -1,5 +1,6 @@ +import("Product_lib"); import("system.vars"); import("system.result"); // TODO: remove when #title is used as display value for lookups -result.string("(select PRODUCT.PRODUCTNAME from PRODUCT where SALESORDERITEM.PRODUCT_ID = PRODUCT.PRODUCTID)"); \ No newline at end of file +result.string(ProductUtils.getProductNameSubSql("SALESORDERITEM.PRODUCT_ID")); \ No newline at end of file diff --git a/entity/Organisation_entity/Organisation_entity.aod b/entity/Organisation_entity/Organisation_entity.aod index e1f1ba4e9dbbcf71b324398f2b0cf32db55ecfaf..65e23603d2cdffce57c098ffae5ed7240f8265d8 100644 --- a/entity/Organisation_entity/Organisation_entity.aod +++ b/entity/Organisation_entity/Organisation_entity.aod @@ -1196,11 +1196,10 @@ </entityActionField> <entityActionField> <name>addAttributeToSelection</name> - <title>Set attribute (use filter result)</title> + <title>Set attribute</title> <onActionProcess>%aditoprj%/entity/Organisation_entity/entityfields/filterviewactiongroup/children/addattributetoselection/onActionProcess.js</onActionProcess> <isObjectAction v="false" /> <iconId>VAADIN:TAGS</iconId> - <titleProcess>%aditoprj%/entity/Organisation_entity/entityfields/filterviewactiongroup/children/addattributetoselection/titleProcess.js</titleProcess> </entityActionField> </children> </entityActionGroup> diff --git a/entity/Organisation_entity/entityfields/address_id/displayValueProcess.js b/entity/Organisation_entity/entityfields/address_id/displayValueProcess.js index f212ec24e70e27e30a7f0a66299874a335617f4d..9fe94ad2b200d48746b253e0bb0d86749f8a8406 100644 --- a/entity/Organisation_entity/entityfields/address_id/displayValueProcess.js +++ b/entity/Organisation_entity/entityfields/address_id/displayValueProcess.js @@ -1,8 +1,13 @@ +import("system.neon"); import("system.db"); import("system.vars"); import("system.result"); import("PostalAddress_lib"); -var addrId = vars.get("$field.ADDRESS_ID"); -var addr = AddressUtils.getFormattedOnlineAddressById(addrId); -result.string(addr); \ No newline at end of file + +if(vars.get("$sys.viewmode") != neon.FRAME_VIEWMODE_TABLE) +{ + var addrId = vars.get("$field.ADDRESS_ID"); + var addr = AddressUtils.getFormattedOnlineAddressById(addrId); + result.string(addr); +} \ No newline at end of file diff --git a/entity/Organisation_entity/entityfields/filterviewactiongroup/children/addattributetoselection/onActionProcess.js b/entity/Organisation_entity/entityfields/filterviewactiongroup/children/addattributetoselection/onActionProcess.js index eab6cf6af945d1665311b84d3cc88f1109548c46..243a94687951fb65e8da2f64c189681dc773b891 100644 --- a/entity/Organisation_entity/entityfields/filterviewactiongroup/children/addattributetoselection/onActionProcess.js +++ b/entity/Organisation_entity/entityfields/filterviewactiongroup/children/addattributetoselection/onActionProcess.js @@ -1,3 +1,4 @@ +import("system.neonFilter"); import("system.translate"); import("system.neon"); import("Context_lib"); @@ -23,4 +24,5 @@ var params = { "ContextTitlePlural_param": translate.text("Companies") } -neon.openContext("AddAttributesToSelection", "AddAttributesToSelectionEdit_view", null, neon.OPERATINGSTATE_NEW, params, null); \ No newline at end of file +var recipe = neonFilter.createEntityRecordsRecipeBuilder().parameters(params).toString(); +neon.openContextWithRecipe("AddAttributesToSelection", "AddAttributesToSelectionEdit_view", recipe, neon.OPERATINGSTATE_NEW); diff --git a/entity/Organisation_entity/entityfields/filterviewactiongroup/children/addattributetoselection/titleProcess.js b/entity/Organisation_entity/entityfields/filterviewactiongroup/children/addattributetoselection/titleProcess.js deleted file mode 100644 index e31afb5e6b090c7196698da50c995e4f04521387..0000000000000000000000000000000000000000 --- a/entity/Organisation_entity/entityfields/filterviewactiongroup/children/addattributetoselection/titleProcess.js +++ /dev/null @@ -1,8 +0,0 @@ -import("system.translate"); -import("system.result"); -import("system.vars"); - -if (vars.get("$sys.selection").length > 0) -{ - result.string(translate.text("set attribute (selected data)")); -} \ No newline at end of file diff --git a/entity/Organisation_entity/entityfields/filterviewactiongroup/children/addplanningtoorganisations/onActionProcess.js b/entity/Organisation_entity/entityfields/filterviewactiongroup/children/addplanningtoorganisations/onActionProcess.js index 4015c373ea1b0e8eaec6b01b545bcfa496111c96..20a028b06554da1a56c47335676462b597cb27d0 100644 --- a/entity/Organisation_entity/entityfields/filterviewactiongroup/children/addplanningtoorganisations/onActionProcess.js +++ b/entity/Organisation_entity/entityfields/filterviewactiongroup/children/addplanningtoorganisations/onActionProcess.js @@ -1,3 +1,4 @@ +import("system.neonFilter"); import("system.vars"); import("system.neon"); @@ -13,5 +14,5 @@ else params["OrganisationsWithFilter_param"] = JSON.stringify(vars.get("$sys.filter")); } - -neon.openContext("PlanningAddToOrganisations", "PlanningAddToOrganisations_view", null, neon.OPERATINGSTATE_NEW, params); +var recipe = neonFilter.createEntityRecordsRecipeBuilder().parameters(params).toString(); +neon.openContextWithRecipe("PlanningAddToOrganisations", "PlanningAddToOrganisations_view", recipe, neon.OPERATINGSTATE_NEW); diff --git a/entity/Organisation_entity/entityfields/filterviewactiongroup/children/openturnover/onActionProcess.js b/entity/Organisation_entity/entityfields/filterviewactiongroup/children/openturnover/onActionProcess.js index 369a9d04fef2289bb2365e8ca9569c95ecb0783a..81c3fc68230919f06ded9ab1cd0ed662eb449190 100644 --- a/entity/Organisation_entity/entityfields/filterviewactiongroup/children/openturnover/onActionProcess.js +++ b/entity/Organisation_entity/entityfields/filterviewactiongroup/children/openturnover/onActionProcess.js @@ -1,3 +1,4 @@ +import("system.neonFilter"); import("system.neon"); import("Context_lib"); import("FilterViewAction_lib"); @@ -19,4 +20,5 @@ var params = { "ContactIds_param": JSON.stringify(contactIds) }; -neon.openContext("Turnover", "TurnoverDynamicMultiDataChartOrganisationGrouping_view", null, neon.OPERATINGSTATE_SEARCH, params, null); \ No newline at end of file +var recipe = neonFilter.createEntityRecordsRecipeBuilder().parameters(params).toString(); +neon.openContextWithRecipe("Turnover", "TurnoverDynamicMultiDataChartOrganisationGrouping_view", recipe, neon.OPERATINGSTATE_SEARCH); diff --git a/entity/Organisation_entity/entityfields/filterviewactiongroup/children/startmarketingworkflows/onActionProcess.js b/entity/Organisation_entity/entityfields/filterviewactiongroup/children/startmarketingworkflows/onActionProcess.js index 2b04867cc90fd72a300747605800b32664d4b5b4..4fed7407fa53f2786ea2a229ed6414667217bf53 100644 --- a/entity/Organisation_entity/entityfields/filterviewactiongroup/children/startmarketingworkflows/onActionProcess.js +++ b/entity/Organisation_entity/entityfields/filterviewactiongroup/children/startmarketingworkflows/onActionProcess.js @@ -1,9 +1,11 @@ +import("system.neonFilter"); import("Context_lib"); import("system.vars"); import("system.neon"); -neon.openContext("MarketingWorkflowLauncher", "MarketingWorkflowLauncherEdit_view", null, neon.OPERATINGSTATE_VIEW, { +var recipe = neonFilter.createEntityRecordsRecipeBuilder().parameters({ "ObjectIds_param": JSON.stringify(vars.get("$sys.selection")), "ObjectFilter_param": JSON.stringify(vars.get("$sys.filter")), "ObjectType_param": ContextUtils.getCurrentContextId() -}); \ No newline at end of file +}).toString(); +neon.openContextWithRecipe("MarketingWorkflowLauncher", "MarketingWorkflowLauncherEdit_view", recipe, neon.OPERATINGSTATE_VIEW); diff --git a/entity/Organisation_entity/entityfields/keywordcontactstates/children/blacklistids_param/valueProcess.js b/entity/Organisation_entity/entityfields/keywordcontactstates/children/blacklistids_param/valueProcess.js index a52cc0873588ad599c0efe525b8ec15716c7ec07..0b40c848fa60b7da8c8d595cb20d5588634d897b 100644 --- a/entity/Organisation_entity/entityfields/keywordcontactstates/children/blacklistids_param/valueProcess.js +++ b/entity/Organisation_entity/entityfields/keywordcontactstates/children/blacklistids_param/valueProcess.js @@ -1,4 +1,4 @@ import("KeywordRegistry_basic"); import("system.result"); -result.object([$KeywordRegistry.contactStatus$markToDelete()]); \ No newline at end of file +result.object([]); \ No newline at end of file diff --git a/entity/Organisation_entity/entityfields/language/displayValueProcess.js b/entity/Organisation_entity/entityfields/language/displayValueProcess.js index fbcdba886ae05f415758c8c9bb4eb8c57600d541..e3f0ad22bd88b89d0bb35c4892150d46eb09083c 100644 --- a/entity/Organisation_entity/entityfields/language/displayValueProcess.js +++ b/entity/Organisation_entity/entityfields/language/displayValueProcess.js @@ -1,5 +1,9 @@ +import("system.neon"); import("system.vars"); import("system.result"); import("Context_lib"); -result.string(ContextUtils.loadContentTitle("Language_entity", vars.get("$field.LANGUAGE"))); \ No newline at end of file +if(vars.get("$sys.viewmode") != neon.FRAME_VIEWMODE_TABLE) +{ + result.string(ContextUtils.loadContentTitle("Language_entity", vars.get("$field.LANGUAGE"))); +} \ No newline at end of file diff --git a/entity/Organisation_entity/entityfields/newappointment/onActionProcess.js b/entity/Organisation_entity/entityfields/newappointment/onActionProcess.js index 0c4be0c71b604e080efc25c139a1b1af45c3c382..bfda3a008b797cd650acd53423be960c9090eedd 100644 --- a/entity/Organisation_entity/entityfields/newappointment/onActionProcess.js +++ b/entity/Organisation_entity/entityfields/newappointment/onActionProcess.js @@ -1,3 +1,4 @@ +import("system.neonFilter"); import("system.calendars"); import("system.vars"); import("system.neon"); @@ -19,5 +20,5 @@ var params = { undefined, undefined, undefined, undefined)) }; -neon.openContext("Appointment", "AppointmentEdit_view", null, neon.OPERATINGSTATE_NEW, params); - +var recipe = neonFilter.createEntityRecordsRecipeBuilder().parameters(params).toString(); +neon.openContextWithRecipe("Appointment", "AppointmentEdit_view", recipe, neon.OPERATINGSTATE_NEW); diff --git a/entity/Organisation_entity/entityfields/newvisitplanentry/onActionProcess.js b/entity/Organisation_entity/entityfields/newvisitplanentry/onActionProcess.js index 3c74f21974a25e4f2437b5721c8cc56fe1a93548..28bc295babc7123076cf234a6304480e29709451 100644 --- a/entity/Organisation_entity/entityfields/newvisitplanentry/onActionProcess.js +++ b/entity/Organisation_entity/entityfields/newvisitplanentry/onActionProcess.js @@ -1,3 +1,4 @@ +import("system.neonFilter"); import("system.neon"); import("system.vars"); @@ -7,4 +8,5 @@ params["NoVisitPlanEmployeeWeek_param"] = true; params["ContactId_param"] = vars.get("$field.CONTACTID"); params["OrganisationId_param"] = vars.get("$field.CONTACTID"); -neon.openContext("VisitPlanEntry", "VisitPlanEntryEdit_view", null, neon.OPERATINGSTATE_NEW, params); \ No newline at end of file +var recipe = neonFilter.createEntityRecordsRecipeBuilder().parameters(params).toString(); +neon.openContextWithRecipe("VisitPlanEntry", "VisitPlanEntryEdit_view", recipe, neon.OPERATINGSTATE_NEW); diff --git a/entity/Organisation_entity/entityfields/newvisitrecommendation/onActionProcess.js b/entity/Organisation_entity/entityfields/newvisitrecommendation/onActionProcess.js index 1ac12a1242e4fb78d2c686a05f7df8dfbddeb361..1dda1b933de4a0f562c16ea618486eba5e14cd74 100644 --- a/entity/Organisation_entity/entityfields/newvisitrecommendation/onActionProcess.js +++ b/entity/Organisation_entity/entityfields/newvisitrecommendation/onActionProcess.js @@ -1,8 +1,9 @@ +import("system.neonFilter"); import("system.neon"); import("system.vars"); var params = {}; - params["ContactId_param"] = vars.getString("$field.CONTACTID"); -neon.openContext("VisitRecommendation", null, null, neon.OPERATINGSTATE_NEW, params); \ No newline at end of file +var recipe = neonFilter.createEntityRecordsRecipeBuilder().parameters(params).toString(); +neon.openContextWithRecipe("VisitRecommendation", null, recipe, neon.OPERATINGSTATE_NEW); diff --git a/entity/Organisation_entity/entityfields/openaroundlocation/onActionProcess.js b/entity/Organisation_entity/entityfields/openaroundlocation/onActionProcess.js index 3195ea511537f5489d464785e31280bae8a33044..ea76ab8ae421b2adae1dc51a7e2b216d6adc94b0 100644 --- a/entity/Organisation_entity/entityfields/openaroundlocation/onActionProcess.js +++ b/entity/Organisation_entity/entityfields/openaroundlocation/onActionProcess.js @@ -1,3 +1,4 @@ +import("system.neonFilter"); import("system.entities"); import("system.vars"); import("system.neon"); @@ -11,4 +12,5 @@ var params = { LocationLon_param: lon } -neon.openContext("AroundLocation", "AroundOrganisationLocation_view", null, null, params, null); \ No newline at end of file +var recipe = neonFilter.createEntityRecordsRecipeBuilder().parameters(params).toString(); +neon.openContextWithRecipe("AroundLocation", "AroundOrganisationLocation_view", recipe, null); diff --git a/entity/Organisation_entity/entityfields/openclassificationoverview/onActionProcess.js b/entity/Organisation_entity/entityfields/openclassificationoverview/onActionProcess.js index 967f69ce8d6c830280a6d3f610a64beefb0a3eb3..8912d68367b9738edb6283ff1540956917d4af9e 100644 --- a/entity/Organisation_entity/entityfields/openclassificationoverview/onActionProcess.js +++ b/entity/Organisation_entity/entityfields/openclassificationoverview/onActionProcess.js @@ -1,7 +1,9 @@ +import("system.neonFilter"); import("system.neon"); import("ClassificationUpdate_lib"); import("system.vars"); var classificationData = ClassificationUtils.executeUpdating(vars.get("$field.CONTACTID"), "Organisation"); -neon.openContext("Classification", "ClassificationTree_view", null, neon.OPERATINGSTATE_SEARCH, {"ClassificationContent_param": classificationData["outputValue"]}, null); \ No newline at end of file +var recipe = neonFilter.createEntityRecordsRecipeBuilder().parameters({"ClassificationContent_param": classificationData["outputValue"]}); +neon.openContextWithRecipe("Classification", "ClassificationTree_view", recipe.toString(), neon.OPERATINGSTATE_SEARCH); diff --git a/entity/Organisation_entity/entityfields/openeditdefaultsview/onActionProcess.js b/entity/Organisation_entity/entityfields/openeditdefaultsview/onActionProcess.js index 9e73af5ae77c715d5914cf5e7d3fd00bcfbc9f94..33349fb9cbdf73d482c959c905bac6ebbc090716 100644 --- a/entity/Organisation_entity/entityfields/openeditdefaultsview/onActionProcess.js +++ b/entity/Organisation_entity/entityfields/openeditdefaultsview/onActionProcess.js @@ -1,4 +1,6 @@ +import("system.neonFilter"); import("system.vars"); import("system.neon"); -neon.openContext("Organisation", "OrganisationEditDefaults_view", [vars.get("$sys.uid")], neon.OPERATINGSTATE_EDIT, null); +var recipe = neonFilter.createEntityRecordsRecipeBuilder().uidsIncludelist([vars.get("$sys.uid")]).toString(); +neon.openContextWithRecipe("Organisation", "OrganisationEditDefaults_view", recipe, neon.OPERATINGSTATE_EDIT); diff --git a/entity/Organisation_entity/entityfields/status/displayValueProcess.js b/entity/Organisation_entity/entityfields/status/displayValueProcess.js index cc03068b7cc2ee7e27814c0ee7969882d15c3a3b..4af59c46e10f25e13d969526aa8cf32be5b716b1 100644 --- a/entity/Organisation_entity/entityfields/status/displayValueProcess.js +++ b/entity/Organisation_entity/entityfields/status/displayValueProcess.js @@ -1,6 +1,10 @@ +import("system.neon"); import("system.result"); import("system.vars"); import("Keyword_lib"); import("KeywordRegistry_basic"); -result.string(KeywordUtils.getViewValue($KeywordRegistry.contactStatus(), vars.get("$field.STATUS"))); +if(vars.get("$sys.viewmode") != neon.FRAME_VIEWMODE_TABLE) +{ + result.string(KeywordUtils.getViewValue($KeywordRegistry.contactStatus(), vars.get("$field.STATUS"))); +} diff --git a/entity/Organisation_entity/entityfields/type/displayValueProcess.js b/entity/Organisation_entity/entityfields/type/displayValueProcess.js index 06795c5d7051cadf68aac11ed47a65873f7fb2e0..8ec1ffbf984fb56bbc4e038a4b29629344257330 100644 --- a/entity/Organisation_entity/entityfields/type/displayValueProcess.js +++ b/entity/Organisation_entity/entityfields/type/displayValueProcess.js @@ -1,6 +1,10 @@ +import("system.neon"); import("system.result"); import("system.vars"); import("Keyword_lib"); import("KeywordRegistry_basic"); -result.string(KeywordUtils.getViewValue($KeywordRegistry.organisationType(), vars.get("$field.TYPE"))); +if(vars.get("$sys.viewmode") != neon.FRAME_VIEWMODE_TABLE) +{ + result.string(KeywordUtils.getViewValue($KeywordRegistry.organisationType(), vars.get("$field.TYPE"))); +} diff --git a/entity/Organisation_entity/recordcontainers/index/query.js b/entity/Organisation_entity/recordcontainers/index/query.js index 3101ad998876a730d77807a182e13846fc3b926c..d2b62c6dcf11ffbcd44e25d1a647ee5548a7d78f 100644 --- a/entity/Organisation_entity/recordcontainers/index/query.js +++ b/entity/Organisation_entity/recordcontainers/index/query.js @@ -27,7 +27,7 @@ var querySelect = newSelect([ sqlHelper.concatWithSeparator(["'" + translate.text("Phone") + ":'", "(" + CommUtil.getStandardSubSqlPhone() + ")"]), sqlHelper.concatWithSeparator(["'" + translate.text("Email") + ":'", "(" + CommUtil.getStandardSubSqlMail() + ")"]) ], " | "), - sqlHelper.concatWithSeparator([sqlHelper.cast("standardAddress.LAT", SQLTYPES.VARCHAR, 16), sqlHelper.cast("standardAddress.LON", SQLTYPES.VARCHAR, 16)], ","), + sqlHelper.concatWithSeparator([sqlHelper.cast("REPLACE(standardAddress.LAT, ',', '.')", SQLTYPES.VARCHAR, 16), sqlHelper.cast("REPLACE(standardAddress.LON, ',', '.')", SQLTYPES.VARCHAR, 16)], ","),, //additional indexed fields "ORGANISATION.NAME", sqlHelper.trim("ORGANISATION.ORGANISATIONID"),//trim to enable filter patterns like: >> -organisationid_value:0<< diff --git a/entity/PermissionCalendar_entity/entityfields/addactions/children/receivenewdepartmentpermissiondealteraction/onActionProcess.js b/entity/PermissionCalendar_entity/entityfields/addactions/children/receivenewdepartmentpermissiondealteraction/onActionProcess.js index 78b952ce03b4c6289a040b97b92619a86fa290c7..64db7ae1635412126375af55310d776b8ff53373 100644 --- a/entity/PermissionCalendar_entity/entityfields/addactions/children/receivenewdepartmentpermissiondealteraction/onActionProcess.js +++ b/entity/PermissionCalendar_entity/entityfields/addactions/children/receivenewdepartmentpermissiondealteraction/onActionProcess.js @@ -1,3 +1,4 @@ +import("system.neonFilter"); import("KeywordRegistry_basic"); import("PermissionCalendar_lib"); import("system.vars"); @@ -6,4 +7,5 @@ import("system.neon"); var params = {}; params["PermissionDealerType_param"] = $KeywordRegistry.permissionCalendarType$department(); params["PermissionProcurer_param"] = vars.get("$param.PermissionProcurer_param"); -neon.openContext("PermissionCalendar", null, null, neon.OPERATINGSTATE_NEW, params); \ No newline at end of file +var recipe = neonFilter.createEntityRecordsRecipeBuilder().parameters(params).toString(); +neon.openContextWithRecipe("PermissionCalendar", null, recipe, neon.OPERATINGSTATE_NEW); diff --git a/entity/PermissionCalendar_entity/entityfields/addactions/children/receivenewuserpermissiondealeraction/onActionProcess.js b/entity/PermissionCalendar_entity/entityfields/addactions/children/receivenewuserpermissiondealeraction/onActionProcess.js index 0aee6ca71f2e5395232268d8d5db5ac0b87bcdcc..496566a222edd05f523942796f679267a5e3491b 100644 --- a/entity/PermissionCalendar_entity/entityfields/addactions/children/receivenewuserpermissiondealeraction/onActionProcess.js +++ b/entity/PermissionCalendar_entity/entityfields/addactions/children/receivenewuserpermissiondealeraction/onActionProcess.js @@ -1,3 +1,4 @@ +import("system.neonFilter"); import("KeywordRegistry_basic"); import("PermissionCalendar_lib"); import("system.vars"); @@ -6,4 +7,5 @@ import("system.neon"); var params = {}; params["PermissionDealerType_param"] = $KeywordRegistry.permissionCalendarType$user(); params["PermissionProcurer_param"] = vars.get("$param.PermissionProcurer_param"); -neon.openContext("PermissionCalendar", null, null, neon.OPERATINGSTATE_NEW, params); \ No newline at end of file +var recipe = neonFilter.createEntityRecordsRecipeBuilder().parameters(params).toString(); +neon.openContextWithRecipe("PermissionCalendar", null, recipe, neon.OPERATINGSTATE_NEW); diff --git a/entity/PermissionCalendar_entity/entityfields/addactionsreverse/children/addnewdepartmentpermissionprocureraction/onActionProcess.js b/entity/PermissionCalendar_entity/entityfields/addactionsreverse/children/addnewdepartmentpermissionprocureraction/onActionProcess.js index 1d2df49b6706814050016064d6cdcc63a551f945..c03f2429e59faad8ca1c95b5d9d41c9fa1eac4d2 100644 --- a/entity/PermissionCalendar_entity/entityfields/addactionsreverse/children/addnewdepartmentpermissionprocureraction/onActionProcess.js +++ b/entity/PermissionCalendar_entity/entityfields/addactionsreverse/children/addnewdepartmentpermissionprocureraction/onActionProcess.js @@ -1,3 +1,4 @@ +import("system.neonFilter"); import("KeywordRegistry_basic"); import("PermissionCalendar_lib"); import("system.vars"); @@ -6,4 +7,5 @@ import("system.neon"); var params = {}; params["PermissionProcurerType_param"] = $KeywordRegistry.permissionCalendarType$department(); params["PermissionDealer_param"] = vars.get("$param.PermissionDealer_param"); -neon.openContext("PermissionCalendar", null, null, neon.OPERATINGSTATE_NEW, params); \ No newline at end of file +var recipe = neonFilter.createEntityRecordsRecipeBuilder().parameters(params).toString(); +neon.openContextWithRecipe("PermissionCalendar", null, recipe, neon.OPERATINGSTATE_NEW); diff --git a/entity/PermissionCalendar_entity/entityfields/addactionsreverse/children/addnewuserpermissionprocureraction/onActionProcess.js b/entity/PermissionCalendar_entity/entityfields/addactionsreverse/children/addnewuserpermissionprocureraction/onActionProcess.js index f2036f9dd03482fbcad1be27e33aa8ea0b39c2ae..d7777039dbb9072b03eb22f46accfb4defdaa1f2 100644 --- a/entity/PermissionCalendar_entity/entityfields/addactionsreverse/children/addnewuserpermissionprocureraction/onActionProcess.js +++ b/entity/PermissionCalendar_entity/entityfields/addactionsreverse/children/addnewuserpermissionprocureraction/onActionProcess.js @@ -1,3 +1,4 @@ +import("system.neonFilter"); import("KeywordRegistry_basic"); import("PermissionCalendar_lib"); import("system.vars"); @@ -6,4 +7,5 @@ import("system.neon"); var params = {}; params["PermissionProcurerType_param"] = $KeywordRegistry.permissionCalendarType$user(); params["PermissionDealer_param"] = vars.get("$param.PermissionDealer_param"); -neon.openContext("PermissionCalendar", null, null, neon.OPERATINGSTATE_NEW, params); \ No newline at end of file +var recipe = neonFilter.createEntityRecordsRecipeBuilder().parameters(params).toString(); +neon.openContextWithRecipe("PermissionCalendar", null, recipe, neon.OPERATINGSTATE_NEW); diff --git a/entity/Person_entity/Person_entity.aod b/entity/Person_entity/Person_entity.aod index 209964e7b90f4f577ef68109237d254453a7f3ac..d661f81015fb5518d1f98785e945d769aeae1257 100644 --- a/entity/Person_entity/Person_entity.aod +++ b/entity/Person_entity/Person_entity.aod @@ -87,13 +87,11 @@ <consumer>Salutations</consumer> <mandatory v="true" /> <mandatoryProcess>%aditoprj%/entity/Person_entity/entityfields/salutation/mandatoryProcess.js</mandatoryProcess> - <displayValueProcess>%aditoprj%/entity/Person_entity/entityfields/salutation/displayValueProcess.js</displayValueProcess> </entityField> <entityField> <name>TITLE</name> <title>Title</title> <consumer>SalutationTitles</consumer> - <displayValueProcess>%aditoprj%/entity/Person_entity/entityfields/title/displayValueProcess.js</displayValueProcess> </entityField> <entityField> <name>TITLESUFFIX</name> @@ -1168,11 +1166,10 @@ </entityActionField> <entityActionField> <name>addAttributeToSelection</name> - <title>Set attribute (use filter result)</title> + <title>Set attribute</title> <onActionProcess>%aditoprj%/entity/Person_entity/entityfields/filterviewactiongroup/children/addattributetoselection/onActionProcess.js</onActionProcess> <isObjectAction v="false" /> <iconId>VAADIN:TAGS</iconId> - <titleProcess>%aditoprj%/entity/Person_entity/entityfields/filterviewactiongroup/children/addattributetoselection/titleProcess.js</titleProcess> </entityActionField> </children> </entityActionGroup> @@ -1388,6 +1385,14 @@ </entityParameter> </children> </entityConsumer> + <entityField> + <name>LETTERSALUTATION</name> + <title>Lettersalutation</title> + </entityField> + <entityField> + <name>contenttitle</name> + <valueProcess>%aditoprj%/entity/Person_entity/entityfields/contenttitle/valueProcess.js</valueProcess> + </entityField> </entityFields> <recordContainers> <dbRecordContainer> @@ -1494,10 +1499,6 @@ <name>LANGUAGE.displayValue</name> <expression>%aditoprj%/entity/Person_entity/recordcontainers/db/recordfieldmappings/language.displayvalue/expression.js</expression> </dbRecordFieldMapping> - <dbRecordFieldMapping> - <name>TITLE.displayValue</name> - <expression>%aditoprj%/entity/Person_entity/recordcontainers/db/recordfieldmappings/title.displayvalue/expression.js</expression> - </dbRecordFieldMapping> <dbRecordFieldMapping> <name>STATUS.value</name> <recordfield>CONTACT.STATUS</recordfield> @@ -1525,8 +1526,6 @@ <dbRecordFieldMapping> <name>ORGANISATION_NAME.value</name> <recordfield>ORGANISATION.NAME</recordfield> - <isFilterable v="true" /> - <isLookupFilter v="true" /> </dbRecordFieldMapping> <dbRecordFieldMapping> <name>USER_NEW.value</name> @@ -1694,6 +1693,14 @@ <consumerMapping> <name>ContactCommunicationSettings</name> </consumerMapping> + <dbRecordFieldMapping> + <name>LETTERSALUTATION.value</name> + <recordfield>CONTACT.LETTERSALUTATION</recordfield> + </dbRecordFieldMapping> + <dbRecordFieldMapping> + <name>contenttitle.value</name> + <expression>%aditoprj%/entity/Person_entity/recordcontainers/db/recordfieldmappings/contenttitle.value/expression.js</expression> + </dbRecordFieldMapping> </recordFieldMappings> <linkInformation> <linkInformation> @@ -1983,14 +1990,14 @@ </indexRecordFieldMapping> <indexRecordFieldMapping> <name>STANDARD_EMAIL_COMMUNICATION.value</name> - <indexFieldType>COMMUNICATION</indexFieldType> + <indexFieldType>TEXT_NO_STOPWORDS</indexFieldType> <additionalFieldNameAliases> <element>email</element> </additionalFieldNameAliases> </indexRecordFieldMapping> <indexRecordFieldMapping> <name>STANDARD_PHONE_COMMUNICATION.value</name> - <indexFieldType>TELEPHONE</indexFieldType> + <indexFieldType>TEXT_NO_STOPWORDS</indexFieldType> <additionalFieldNameAliases> <element>phone</element> </additionalFieldNameAliases> diff --git a/entity/Person_entity/contentTitleProcess.js b/entity/Person_entity/contentTitleProcess.js index 68305e82bfdac45f9d0e8f2f92c77e6a01b1b6de..4377860159677ac5ec536efc7618c0657d1372ff 100644 --- a/entity/Person_entity/contentTitleProcess.js +++ b/entity/Person_entity/contentTitleProcess.js @@ -1,16 +1,4 @@ import("system.vars"); import("system.result"); -import("Util_lib"); -import("Contact_lib"); -//do not use "FULL_NAME_fieldGroup" here since the field group must not include the orgname -var contact = new Contact(); -contact.salutation = vars.get("$field.SALUTATION"); -contact.title = vars.get("$field.TITLE"); -contact.firstname = vars.get("$field.FIRSTNAME"); -contact.middlename = vars.get("$field.MIDDLENAME"); -contact.lastname = vars.get("$field.LASTNAME"); -contact.organisationName = vars.get("$field.ORGANISATION_NAME"); - -var renderer = new ContactTitleRenderer(contact, null); -result.string(renderer.asString()); \ No newline at end of file +result.string(vars.get("$field.contenttitle")); \ No newline at end of file diff --git a/entity/Person_entity/entityfields/contenttitle/valueProcess.js b/entity/Person_entity/entityfields/contenttitle/valueProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..9be045d756af234887a638af0e4e9bc2b3f25193 --- /dev/null +++ b/entity/Person_entity/entityfields/contenttitle/valueProcess.js @@ -0,0 +1,16 @@ +import("system.vars"); +import("system.result"); +import("Util_lib"); +import("Contact_lib"); + +//do not use "FULL_NAME_fieldGroup" here since the field group must not include the orgname +var contact = new Contact(); +contact.salutation = vars.get("$field.SALUTATION"); +contact.title = vars.get("$field.TITLE"); +contact.firstname = vars.get("$field.FIRSTNAME"); +contact.middlename = vars.get("$field.MIDDLENAME"); +contact.lastname = vars.get("$field.LASTNAME"); +contact.organisationName = vars.get("$field.ORGANISATION_NAME"); + +var renderer = new ContactTitleRenderer(contact, null); +result.string(renderer.asString()); diff --git a/entity/Person_entity/entityfields/duplicatesperson/children/duplicateobject_param/valueProcess.js b/entity/Person_entity/entityfields/duplicatesperson/children/duplicateobject_param/valueProcess.js index cd2472c731ef60d9d47a3ed46c322b74444cfda1..542e2339659cd8e5816e494da6464a98ec0db0ad 100644 --- a/entity/Person_entity/entityfields/duplicatesperson/children/duplicateobject_param/valueProcess.js +++ b/entity/Person_entity/entityfields/duplicatesperson/children/duplicateobject_param/valueProcess.js @@ -31,5 +31,6 @@ result.object(DuplicateScannerUtils.getDataForDuplicateCheck(EntityUtils.getCurr STANDARD_COUNTRY: vars.get("$field.STANDARD_COUNTRY"), STANDARD_EMAIL_COMMUNICATION: vars.get("$field.STANDARD_EMAIL_COMMUNICATION") || (email ? email["ADDR"] : ""), STANDARD_PHONE_COMMUNICATION: vars.get("$field.STANDARD_PHONE_COMMUNICATION"), - STANDARD_ZIP: vars.get("$field.STANDARD_ZIP") + STANDARD_ZIP: vars.get("$field.STANDARD_ZIP"), + ORGANISATION_ID: vars.get("$field.ORGANISATION_ID") })); \ No newline at end of file diff --git a/entity/Person_entity/entityfields/filterviewactiongroup/children/addattributetoselection/onActionProcess.js b/entity/Person_entity/entityfields/filterviewactiongroup/children/addattributetoselection/onActionProcess.js index f4ab243e9813a5b1b186a161f8889a8cfef4d4be..b56b0d4d1f3314c32255b8cd2b0b1f76edcdbe77 100644 --- a/entity/Person_entity/entityfields/filterviewactiongroup/children/addattributetoselection/onActionProcess.js +++ b/entity/Person_entity/entityfields/filterviewactiongroup/children/addattributetoselection/onActionProcess.js @@ -1,3 +1,4 @@ +import("system.neonFilter"); import("system.translate"); import("system.neon"); import("Context_lib"); @@ -21,6 +22,7 @@ var params = { "ContextId_param": currentContext, "Datalength_param": ids.length, "ContextTitlePlural_param": translate.text("Contacts") -} +}; -neon.openContext("AddAttributesToSelection", "AddAttributesToSelectionEdit_view", null, neon.OPERATINGSTATE_NEW, params, null); \ No newline at end of file +var recipe = neonFilter.createEntityRecordsRecipeBuilder().parameters(params).toString(); +neon.openContextWithRecipe("AddAttributesToSelection", "AddAttributesToSelectionEdit_view", recipe, neon.OPERATINGSTATE_NEW); diff --git a/entity/Person_entity/entityfields/filterviewactiongroup/children/addattributetoselection/titleProcess.js b/entity/Person_entity/entityfields/filterviewactiongroup/children/addattributetoselection/titleProcess.js deleted file mode 100644 index f5b266e73f872e682e54a918083f14883f9dc415..0000000000000000000000000000000000000000 --- a/entity/Person_entity/entityfields/filterviewactiongroup/children/addattributetoselection/titleProcess.js +++ /dev/null @@ -1,8 +0,0 @@ -import("system.translate"); -import("system.result"); -import("system.vars"); - -if (vars.get("$sys.selection").length > 0) -{ - result.string(translate.text("set attribute (selected data)")) -} \ No newline at end of file diff --git a/entity/Person_entity/entityfields/filterviewactiongroup/children/startmarketingworkflows/onActionProcess.js b/entity/Person_entity/entityfields/filterviewactiongroup/children/startmarketingworkflows/onActionProcess.js index 2b04867cc90fd72a300747605800b32664d4b5b4..4fed7407fa53f2786ea2a229ed6414667217bf53 100644 --- a/entity/Person_entity/entityfields/filterviewactiongroup/children/startmarketingworkflows/onActionProcess.js +++ b/entity/Person_entity/entityfields/filterviewactiongroup/children/startmarketingworkflows/onActionProcess.js @@ -1,9 +1,11 @@ +import("system.neonFilter"); import("Context_lib"); import("system.vars"); import("system.neon"); -neon.openContext("MarketingWorkflowLauncher", "MarketingWorkflowLauncherEdit_view", null, neon.OPERATINGSTATE_VIEW, { +var recipe = neonFilter.createEntityRecordsRecipeBuilder().parameters({ "ObjectIds_param": JSON.stringify(vars.get("$sys.selection")), "ObjectFilter_param": JSON.stringify(vars.get("$sys.filter")), "ObjectType_param": ContextUtils.getCurrentContextId() -}); \ No newline at end of file +}).toString(); +neon.openContextWithRecipe("MarketingWorkflowLauncher", "MarketingWorkflowLauncherEdit_view", recipe, neon.OPERATINGSTATE_VIEW); diff --git a/entity/Person_entity/entityfields/full_name_fieldgroup/valueProcess.js b/entity/Person_entity/entityfields/full_name_fieldgroup/valueProcess.js index 778c203ff13f6bc2955db27cc8c7ec6544de380d..07e52e7b7e19bc619a6949f01cc2a1b9dfabf8d3 100644 --- a/entity/Person_entity/entityfields/full_name_fieldgroup/valueProcess.js +++ b/entity/Person_entity/entityfields/full_name_fieldgroup/valueProcess.js @@ -1,15 +1,4 @@ import("system.vars"); import("system.result"); -import("Util_lib"); -import("Contact_lib"); -//no orgname here since the org-field is in the card-template as separate field -var contact = new Contact(); -contact.salutation = vars.get("$field.SALUTATION"); -contact.title = vars.get("$field.TITLE"); -contact.firstname = vars.get("$field.FIRSTNAME"); -contact.middlename = vars.get("$field.MIDDLENAME"); -contact.lastname = vars.get("$field.LASTNAME"); - -var renderer = new ContactTitleRenderer(contact, null); -result.string(renderer.asString()); \ No newline at end of file +result.string(vars.get("$field.contenttitle")); \ No newline at end of file diff --git a/entity/Person_entity/entityfields/gender/displayValueProcess.js b/entity/Person_entity/entityfields/gender/displayValueProcess.js index 734a0b1410de96958c342202f8aad49b52ed096e..bd75bed0d063d73ff9f21db088c41a844723c0a1 100644 --- a/entity/Person_entity/entityfields/gender/displayValueProcess.js +++ b/entity/Person_entity/entityfields/gender/displayValueProcess.js @@ -1,3 +1,4 @@ +import("system.neon"); import("system.vars"); import("KeywordRegistry_basic"); import("system.result"); @@ -6,7 +7,7 @@ import("Sql_lib"); var sex = vars.get("$field.GENDER"); -if (sex) +if (sex && vars.get("$sys.viewmode") != neon.FRAME_VIEWMODE_TABLE) { var keyword = KeywordUtils.getViewValue($KeywordRegistry.personGender(), sex); result.string(keyword) diff --git a/entity/Person_entity/entityfields/keywordcontactstates/children/blacklistids_param/valueProcess.js b/entity/Person_entity/entityfields/keywordcontactstates/children/blacklistids_param/valueProcess.js index a52cc0873588ad599c0efe525b8ec15716c7ec07..0b40c848fa60b7da8c8d595cb20d5588634d897b 100644 --- a/entity/Person_entity/entityfields/keywordcontactstates/children/blacklistids_param/valueProcess.js +++ b/entity/Person_entity/entityfields/keywordcontactstates/children/blacklistids_param/valueProcess.js @@ -1,4 +1,4 @@ import("KeywordRegistry_basic"); import("system.result"); -result.object([$KeywordRegistry.contactStatus$markToDelete()]); \ No newline at end of file +result.object([]); \ No newline at end of file diff --git a/entity/Person_entity/entityfields/language/displayValueProcess.js b/entity/Person_entity/entityfields/language/displayValueProcess.js index fbcdba886ae05f415758c8c9bb4eb8c57600d541..d3a07fff8b2bda7c274e496509ad886261bf458b 100644 --- a/entity/Person_entity/entityfields/language/displayValueProcess.js +++ b/entity/Person_entity/entityfields/language/displayValueProcess.js @@ -1,5 +1,9 @@ +import("system.neon"); import("system.vars"); import("system.result"); import("Context_lib"); -result.string(ContextUtils.loadContentTitle("Language_entity", vars.get("$field.LANGUAGE"))); \ No newline at end of file +if(vars.get("$sys.viewmode") != neon.FRAME_VIEWMODE_TABLE) +{ + result.string(ContextUtils.loadContentTitle("Language_entity", vars.get("$field.LANGUAGE"))); +} \ No newline at end of file diff --git a/entity/Person_entity/entityfields/newappointment/onActionProcess.js b/entity/Person_entity/entityfields/newappointment/onActionProcess.js index 703676cc9ebc97f75fa7af44bd667ec938349ef6..24c63b5bd7ba7ff1cc36f7f101d6b43e65433bd2 100644 --- a/entity/Person_entity/entityfields/newappointment/onActionProcess.js +++ b/entity/Person_entity/entityfields/newappointment/onActionProcess.js @@ -1,3 +1,4 @@ +import("system.neonFilter"); import("system.calendars"); import("system.vars"); import("system.neon"); @@ -23,4 +24,5 @@ var params = { undefined, undefined, undefined, undefined)) }; -neon.openContext("Appointment", "AppointmentEdit_view", null, neon.OPERATINGSTATE_NEW, params); \ No newline at end of file +var recipe = neonFilter.createEntityRecordsRecipeBuilder().parameters(params).toString(); +neon.openContextWithRecipe("Appointment", "AppointmentEdit_view", recipe, neon.OPERATINGSTATE_NEW); diff --git a/entity/Person_entity/entityfields/newemail/onActionProcess.js b/entity/Person_entity/entityfields/newemail/onActionProcess.js index c4ff5861b8aa9dc43e67f0d8975c65216188aab6..10ca61158282d7cf461aa41254b3143ea30a2b77 100644 --- a/entity/Person_entity/entityfields/newemail/onActionProcess.js +++ b/entity/Person_entity/entityfields/newemail/onActionProcess.js @@ -4,4 +4,4 @@ import("KeywordRegistry_basic"); EmailWritingUtils.openNewMail(vars.getString("$field.CONTACTID"), null, vars.get("$sys.currentcontextname"), null, null, null, null, null, - $KeywordRegistry.documentTemplateTypeCategory$single()); \ No newline at end of file + $KeywordRegistry.documentTemplateTypeCategory$single(), vars.get("$field.LANGUAGE")); \ No newline at end of file diff --git a/entity/Person_entity/entityfields/newsupportticket/onActionProcess.js b/entity/Person_entity/entityfields/newsupportticket/onActionProcess.js index 9ce97cf9edc967900a590b6fb95efbbd7efa9c08..4baccf9cc1621ccf97c1c19880854cfc665f21c2 100644 --- a/entity/Person_entity/entityfields/newsupportticket/onActionProcess.js +++ b/entity/Person_entity/entityfields/newsupportticket/onActionProcess.js @@ -1,3 +1,4 @@ +import("system.neonFilter"); import("system.neon"); import("system.vars"); @@ -5,4 +6,5 @@ var obj_links = { TaskRequestorContactId_param: vars.get( "$field.CONTACTID"), "PresetLinks_param":JSON.stringify([["Person",vars.get("$field.CONTACTID")]]) }; -neon.openContext("SupportTicket", "SupportTicketEdit_view", null, neon.OPERATINGSTATE_NEW, obj_links); \ No newline at end of file +var recipe = neonFilter.createEntityRecordsRecipeBuilder().parameters(obj_links).toString(); +neon.openContextWithRecipe("SupportTicket", "SupportTicketEdit_view", recipe, neon.OPERATINGSTATE_NEW); diff --git a/entity/Person_entity/entityfields/newvisitplanentry/onActionProcess.js b/entity/Person_entity/entityfields/newvisitplanentry/onActionProcess.js index 3c74f21974a25e4f2437b5721c8cc56fe1a93548..28bc295babc7123076cf234a6304480e29709451 100644 --- a/entity/Person_entity/entityfields/newvisitplanentry/onActionProcess.js +++ b/entity/Person_entity/entityfields/newvisitplanentry/onActionProcess.js @@ -1,3 +1,4 @@ +import("system.neonFilter"); import("system.neon"); import("system.vars"); @@ -7,4 +8,5 @@ params["NoVisitPlanEmployeeWeek_param"] = true; params["ContactId_param"] = vars.get("$field.CONTACTID"); params["OrganisationId_param"] = vars.get("$field.CONTACTID"); -neon.openContext("VisitPlanEntry", "VisitPlanEntryEdit_view", null, neon.OPERATINGSTATE_NEW, params); \ No newline at end of file +var recipe = neonFilter.createEntityRecordsRecipeBuilder().parameters(params).toString(); +neon.openContextWithRecipe("VisitPlanEntry", "VisitPlanEntryEdit_view", recipe, neon.OPERATINGSTATE_NEW); diff --git a/entity/Person_entity/entityfields/newvisitrecommendation/onActionProcess.js b/entity/Person_entity/entityfields/newvisitrecommendation/onActionProcess.js index 20eba0e1aca21c0349ba3eb04313ac6985330162..c8897c510785a577c3cfd42aabff81053e465d52 100644 --- a/entity/Person_entity/entityfields/newvisitrecommendation/onActionProcess.js +++ b/entity/Person_entity/entityfields/newvisitrecommendation/onActionProcess.js @@ -1,3 +1,4 @@ +import("system.neonFilter"); import("system.logging"); import("Sql_lib"); import("system.neon"); @@ -12,4 +13,5 @@ var orgContactId = newSelect("CONTACT.CONTACTID").from("CONTACT").where("CONTACT params["ContactIdPerson_param"] = personContactId; params["ContactId_param"] = orgContactId; -neon.openContext("VisitRecommendation", null, null, neon.OPERATINGSTATE_NEW, params); \ No newline at end of file +var recipe = neonFilter.createEntityRecordsRecipeBuilder().parameters(params).toString(); +neon.openContextWithRecipe("VisitRecommendation", null, recipe, neon.OPERATINGSTATE_NEW); diff --git a/entity/Person_entity/entityfields/openeditdefaultsview/onActionProcess.js b/entity/Person_entity/entityfields/openeditdefaultsview/onActionProcess.js index cc435ca0111d467edb0366262b8c29b82f504f7b..2e316f659b8f69d5423e3643247b5241876a6175 100644 --- a/entity/Person_entity/entityfields/openeditdefaultsview/onActionProcess.js +++ b/entity/Person_entity/entityfields/openeditdefaultsview/onActionProcess.js @@ -1,4 +1,6 @@ +import("system.neonFilter"); import("system.vars"); import("system.neon"); -neon.openContext("Person", "PersonEditDefaults_view", [vars.get("$field.CONTACTID")], neon.OPERATINGSTATE_EDIT, null); \ No newline at end of file +var recipe = neonFilter.createEntityRecordsRecipeBuilder().uidsIncludelist([vars.get("$field.CONTACTID")]); +neon.openContextWithRecipe("Person", "PersonEditDefaults_view", recipe.toString(), neon.OPERATINGSTATE_EDIT); diff --git a/entity/Person_entity/entityfields/organisation_contactid/displayValueProcess.js b/entity/Person_entity/entityfields/organisation_contactid/displayValueProcess.js index cc0128938026864ece7d645d38276aa195367b0a..30512466e9a209ba907bce1b5471b5a07434cafb 100644 --- a/entity/Person_entity/entityfields/organisation_contactid/displayValueProcess.js +++ b/entity/Person_entity/entityfields/organisation_contactid/displayValueProcess.js @@ -3,5 +3,7 @@ import("system.result"); import("system.neon"); import("system.vars"); -if (vars.get("$sys.recordstate") == neon.OPERATINGSTATE_NEW && vars.get("$this.value")) - result.string(OrganisationUtils.getNameByContactId(vars.get("$this.value"))); \ No newline at end of file +if (vars.get("$sys.viewmode") != neon.FRAME_VIEWMODE_TABLE) +{ + result.string(OrganisationUtils.getNameByContactId(vars.get("$field.ORGANISATION_CONTACTID"))); +} \ No newline at end of file diff --git a/entity/Person_entity/entityfields/salutation/displayValueProcess.js b/entity/Person_entity/entityfields/salutation/displayValueProcess.js deleted file mode 100644 index 275e5fb9a51310d5d2b8e0d427aec3415a2b6c73..0000000000000000000000000000000000000000 --- a/entity/Person_entity/entityfields/salutation/displayValueProcess.js +++ /dev/null @@ -1,5 +0,0 @@ -import("system.vars"); -import("system.result"); - -if(vars.get("$field.SALUTATION")) - result.string(vars.get("$field.SALUTATION")); \ No newline at end of file diff --git a/entity/Person_entity/entityfields/status/displayValueProcess.js b/entity/Person_entity/entityfields/status/displayValueProcess.js index b9185cff9ec6fc9022ed92033e064118bfc493b7..c5555df134cf20af0700ae6e5ae762f9d9ae95c3 100644 --- a/entity/Person_entity/entityfields/status/displayValueProcess.js +++ b/entity/Person_entity/entityfields/status/displayValueProcess.js @@ -1,10 +1,11 @@ +import("system.neon"); import("system.result"); import("system.vars"); import("KeywordRegistry_basic"); import("Keyword_lib"); var key = vars.get("$field.STATUS"); -if (key) +if (key && vars.get("$sys.viewmode") != neon.FRAME_VIEWMODE_TABLE) { var res = KeywordUtils.getViewValue($KeywordRegistry.contactStatus(), key); result.string(res); diff --git a/entity/Person_entity/entityfields/title/displayValueProcess.js b/entity/Person_entity/entityfields/title/displayValueProcess.js deleted file mode 100644 index 9023d1aa7e54c97980047d0aed8f9fdc50e1b157..0000000000000000000000000000000000000000 --- a/entity/Person_entity/entityfields/title/displayValueProcess.js +++ /dev/null @@ -1,5 +0,0 @@ -import("system.result"); -import("system.vars"); - -if (vars.get("$field.TITLE")) - result.string(vars.get("$field.TITLE")); diff --git a/entity/Person_entity/initFilterProcess.js b/entity/Person_entity/initFilterProcess.js index d7dedeb79a5dd69c1e835cf2ccd96ecd6e730f07..325c64de44cb37720a85956dc2f93ed946b9d3e7 100644 --- a/entity/Person_entity/initFilterProcess.js +++ b/entity/Person_entity/initFilterProcess.js @@ -11,7 +11,7 @@ if(searchSyncCond) { filter = searchSyncCond; } -else if(!filter && vars.get("$sys.presentationmode") === neon.CONTEXT_PRESENTATIONMODE_FILTER) +else if(!filter && [neon.CONTEXT_PRESENTATIONMODE_FILTER, neon.CONTEXT_PRESENTATIONMODE_DASHBOARD].includes(vars.get("$sys.presentationmode"))) { var statusInactive = $KeywordRegistry.contactStatus$inactive(); filter = JSON.stringify({ diff --git a/entity/Person_entity/recordcontainers/db/recordfieldmappings/contenttitle.value/expression.js b/entity/Person_entity/recordcontainers/db/recordfieldmappings/contenttitle.value/expression.js new file mode 100644 index 0000000000000000000000000000000000000000..dc1aa5d98130fc5d2c838da056f5d70acc70d2af --- /dev/null +++ b/entity/Person_entity/recordcontainers/db/recordfieldmappings/contenttitle.value/expression.js @@ -0,0 +1,21 @@ +import("system.db"); +import("Contact_lib"); +import("system.result"); +import("system.vars"); +import("Util_lib"); +import("Contact_lib"); + +let contenttitleSQL; + +// This is need for the derby db, because the derby db don't have a REPLACE-Function, which is needed for the dissolution of the salutation +if (db.getDatabaseType(db.getCurrentAlias()) == db.DBTYPE_DERBY10) +{ + var renderer = new ContactTitleRenderer(Contact.createWithColumnPreset(), null); + contenttitleSQL = renderer.asSql(); +} +else +{ + contenttitleSQL = Contacttils.getContactSalutationSubSql(true); +} + +result.string(contenttitleSQL); \ No newline at end of file diff --git a/entity/PlanningAddToOrganisations_entity/afterSave.js b/entity/PlanningAddToOrganisations_entity/afterSave.js index 559470208ca89a3a5a43ca4f2f8c6f06d2fd591b..b5b99c2ad971fe02b568b934db434465d4a88d08 100644 --- a/entity/PlanningAddToOrganisations_entity/afterSave.js +++ b/entity/PlanningAddToOrganisations_entity/afterSave.js @@ -1,3 +1,4 @@ +import("system.neonFilter"); import("system.neon"); import("system.vars"); @@ -11,4 +12,5 @@ var params = { "PlanningIdsAlreadyExists_param": existingPlannings }; -neon.openContext("PlanningAddToOrganisations", "PlanningAddToOrganisationOverlay_view", [uid], neon.OPERATINGSTATE_VIEW, params); \ No newline at end of file +var recipe = neonFilter.createEntityRecordsRecipeBuilder().uidsIncludelist([uid]).parameters(params).toString(); +neon.openContextWithRecipe("PlanningAddToOrganisations", "PlanningAddToOrganisationOverlay_view", recipe, neon.OPERATINGSTATE_VIEW); diff --git a/entity/PlanningChangeStatusAndResponsible_entity/afterSave.js b/entity/PlanningChangeStatusAndResponsible_entity/afterSave.js index 87b9d67c893c48c3194bc93885b0d2f983204995..457aa12456d8759bca475cf2da984b5f54488055 100644 --- a/entity/PlanningChangeStatusAndResponsible_entity/afterSave.js +++ b/entity/PlanningChangeStatusAndResponsible_entity/afterSave.js @@ -1,3 +1,4 @@ +import("system.neonFilter"); import("system.neon"); import("system.vars"); @@ -5,9 +6,9 @@ var orgContactId = vars.get("$param.OrganisationContactId_param"); if(orgContactId) { - neon.openContext("Organisation", "OrganisationMain_view", [orgContactId], neon.OPERATINGSTATE_VIEW, null, "4c03be39-db8d-4cef-b75c-3325f70101c2"); + neon.openContextWithRecipe("Organisation", "OrganisationMain_view", neonFilter.createEntityRecordsRecipeBuilder().uidsIncludelist([orgContactId]).toString(), neon.OPERATINGSTATE_VIEW, "4c03be39-db8d-4cef-b75c-3325f70101c2"); } else { - neon.openContext("Planning", "PlanningFilter_view", null, neon.OPERATINGSTATE_SEARCH, null, null); + neon.openContextWithRecipe("Planning", "PlanningFilter_view", neonFilter.createEntityRecordsRecipeBuilder().toString(), neon.OPERATINGSTATE_SEARCH); } diff --git a/entity/Planning_entity/Planning_entity.aod b/entity/Planning_entity/Planning_entity.aod index 7db241b3cdebae206d002b2f5dfcdb6c40d51e58..272d77a0807f3323d412be46be3c20b510e7adf9 100644 --- a/entity/Planning_entity/Planning_entity.aod +++ b/entity/Planning_entity/Planning_entity.aod @@ -197,6 +197,10 @@ <name>PlanningIds_param</name> <expose v="true" /> </entityParameter> + <entityField> + <name>PICTURE</name> + <contentType>IMAGE</contentType> + </entityField> </entityFields> <recordContainers> <dbRecordContainer> @@ -259,6 +263,10 @@ <name>GROUPCODE.displayValue</name> <expression>%aditoprj%/entity/Planning_entity/recordcontainers/db/recordfieldmappings/groupcode.displayvalue/expression.js</expression> </dbRecordFieldMapping> + <dbRecordFieldMapping> + <name>PICTURE.value</name> + <expression>%aditoprj%/entity/Planning_entity/recordcontainers/db/recordfieldmappings/picture.value/expression.js</expression> + </dbRecordFieldMapping> </recordFieldMappings> <linkInformation> <linkInformation> diff --git a/entity/Planning_entity/entityfields/filterviewactions/children/changeresponsible/onActionProcess.js b/entity/Planning_entity/entityfields/filterviewactions/children/changeresponsible/onActionProcess.js index dc355adfad0f5c6dd5e131d51fb14ddadea9c051..761398f02f15b709e61386779baef67f82bd781c 100644 --- a/entity/Planning_entity/entityfields/filterviewactions/children/changeresponsible/onActionProcess.js +++ b/entity/Planning_entity/entityfields/filterviewactions/children/changeresponsible/onActionProcess.js @@ -1,3 +1,4 @@ +import("system.neonFilter"); import("system.vars"); import("system.neon"); @@ -10,4 +11,5 @@ if(vars.get("$param.ContactId_param")) params["OrganisationContactId_param"] = vars.get("$param.ContactId_param"); } -neon.openContext("PlanningChangeStatusAndResponsible", "PlanningChangeResponsible_view", null, neon.OPERATINGSTATE_NEW, params); \ No newline at end of file +var recipe = neonFilter.createEntityRecordsRecipeBuilder().parameters(params).toString(); +neon.openContextWithRecipe("PlanningChangeStatusAndResponsible", "PlanningChangeResponsible_view", recipe, neon.OPERATINGSTATE_NEW); diff --git a/entity/Planning_entity/entityfields/filterviewactions/children/changestatus/onActionProcess.js b/entity/Planning_entity/entityfields/filterviewactions/children/changestatus/onActionProcess.js index c3e1224d7beec61e97ade927146387bcddff6942..14d717de33f6024c0cf3a757464031e6521f361d 100644 --- a/entity/Planning_entity/entityfields/filterviewactions/children/changestatus/onActionProcess.js +++ b/entity/Planning_entity/entityfields/filterviewactions/children/changestatus/onActionProcess.js @@ -1,3 +1,4 @@ +import("system.neonFilter"); import("system.vars"); import("system.neon"); @@ -10,4 +11,5 @@ if(vars.get("$param.ContactId_param")) params["OrganisationContactId_param"] = vars.get("$param.ContactId_param"); } -neon.openContext("PlanningChangeStatusAndResponsible", "PlanningChangeStatus_view", null, neon.OPERATINGSTATE_NEW, params); \ No newline at end of file +var recipe = neonFilter.createEntityRecordsRecipeBuilder().parameters(params).toString(); +neon.openContextWithRecipe("PlanningChangeStatusAndResponsible", "PlanningChangeStatus_view", recipe, neon.OPERATINGSTATE_NEW); diff --git a/entity/Planning_entity/recordcontainers/db/recordfieldmappings/picture.value/expression.js b/entity/Planning_entity/recordcontainers/db/recordfieldmappings/picture.value/expression.js new file mode 100644 index 0000000000000000000000000000000000000000..efc140d3848ea39c7746077006ca35b2426d0acd --- /dev/null +++ b/entity/Planning_entity/recordcontainers/db/recordfieldmappings/picture.value/expression.js @@ -0,0 +1,10 @@ +import("KeywordRegistry_basic"); +import("Keyword_lib"); +import("system.result"); +import("Sql_lib"); + +var sqlMask = new SqlMaskingUtils(); + +var sql = sqlMask.concatenate(["'TEXT:'", KeywordUtils.getResolvedTitleSqlPart($KeywordRegistry.forecastStatus(), "FORECAST.STATUS")]); + +result.string(sql.toString()); \ No newline at end of file diff --git a/entity/Prod2prod_entity/Prod2prod_entity.aod b/entity/Prod2prod_entity/Prod2prod_entity.aod index 4136115ae9e7f51ec02c8e2f946baeb09a3a43ab..2cc4ae001df0fc3f0c49ca346d6ff4fdab3b273c 100644 --- a/entity/Prod2prod_entity/Prod2prod_entity.aod +++ b/entity/Prod2prod_entity/Prod2prod_entity.aod @@ -140,6 +140,10 @@ <entityField> <name>UID</name> </entityField> + <entityField> + <name>PICTURE</name> + <contentType>IMAGE</contentType> + </entityField> </entityFields> <recordContainers> <jDitoRecordContainer> @@ -190,6 +194,9 @@ <jDitoRecordFieldMapping> <name>unit.displayValue</name> </jDitoRecordFieldMapping> + <jDitoRecordFieldMapping> + <name>PICTURE.value</name> + </jDitoRecordFieldMapping> <jDitoRecordFieldMapping> <name>currentPurchasePrice.value</name> </jDitoRecordFieldMapping> diff --git a/entity/Prod2prod_entity/entityfields/alter/children/insert/onActionProcess.js b/entity/Prod2prod_entity/entityfields/alter/children/insert/onActionProcess.js index c599a0919963ad333599a18e1f2f6985a706f51b..336085602bcac30e644d479f66adc968ae6675f5 100644 --- a/entity/Prod2prod_entity/entityfields/alter/children/insert/onActionProcess.js +++ b/entity/Prod2prod_entity/entityfields/alter/children/insert/onActionProcess.js @@ -1,3 +1,4 @@ +import("system.neonFilter"); import("system.neon"); import("system.vars"); @@ -13,6 +14,7 @@ if (vars.exists("$sys.selectionRows") && vars.get("$sys.selectionRows")) "CurrentProductId_param" : productId }; - neon.openContext("Prod2prod", "Prod2ProdEdit_view", null, neon.OPERATINGSTATE_NEW, params); + var recipe = neonFilter.createEntityRecordsRecipeBuilder().parameters(params).toString(); + neon.openContextWithRecipe("Prod2prod", "Prod2ProdEdit_view", recipe, neon.OPERATINGSTATE_NEW); } } \ No newline at end of file diff --git a/entity/Prod2prod_entity/recordcontainers/jdito/contentProcess.js b/entity/Prod2prod_entity/recordcontainers/jdito/contentProcess.js index bb1b8c223115b5ed5937f795d5ee3890d2174718..9c60cc28a8c3905a4c3419520d44bdb5ac1ea277 100644 --- a/entity/Prod2prod_entity/recordcontainers/jdito/contentProcess.js +++ b/entity/Prod2prod_entity/recordcontainers/jdito/contentProcess.js @@ -7,6 +7,8 @@ import("Sql_lib"); import("Keyword_lib"); import("KeywordRegistry_basic"); +var sqlMask = new SqlMaskingUtils(); + var query = newSelect([ "PROD2PROD.PROD2PRODID", // UID.value "PROD2PROD.PROD2PRODID", // PROD2PRODID.value @@ -23,7 +25,8 @@ var query = newSelect([ KeywordUtils.getResolvedTitleSqlPart( // unit.displaValue $KeywordRegistry.quantityUnit(), "PRODUCT.UNIT" - ) + ), + sqlMask.concatenate(["'TEXT:'", "PRODUCT.PRODUCTCODE"]) ]).from("PROD2PROD") .join("PRODUCT", "PRODUCT.PRODUCTID = PROD2PROD.SOURCE_ID"); diff --git a/entity/Product_entity/entityfields/addtooffer/onActionProcess.js b/entity/Product_entity/entityfields/addtooffer/onActionProcess.js index 1e0d4dfbc0c56000930864c2a81fe102fcb2583b..546c24d014d84332730819b364ce5f3103a79334 100644 --- a/entity/Product_entity/entityfields/addtooffer/onActionProcess.js +++ b/entity/Product_entity/entityfields/addtooffer/onActionProcess.js @@ -1,8 +1,9 @@ +import("system.neonFilter"); import("system.neon"); import("system.vars"); var params = JSON.parse(vars.get("$param.OrderOfferInformations_param")); - params["ProductId_param"] = vars.get("$field.PRODUCTID"); -neon.openContext("OfferItem", "OfferItemEdit_view", null, neon.OPERATINGSTATE_NEW, params); \ No newline at end of file +var recipe = neonFilter.createEntityRecordsRecipeBuilder().parameters(params).toString(); +neon.openContextWithRecipe("OfferItem", "OfferItemEdit_view", recipe, neon.OPERATINGSTATE_NEW); diff --git a/entity/Product_entity/entityfields/addtoorder/onActionProcess.js b/entity/Product_entity/entityfields/addtoorder/onActionProcess.js index 9e9d45e347cf3867e9165e75c7cdc2cb9253ae19..8efbb6acb5cfd6fa9c70f08a8417bc27792bd115 100644 --- a/entity/Product_entity/entityfields/addtoorder/onActionProcess.js +++ b/entity/Product_entity/entityfields/addtoorder/onActionProcess.js @@ -1,9 +1,9 @@ +import("system.neonFilter"); import("system.neon"); import("system.vars"); var params = JSON.parse(vars.get("$param.OrderOfferInformations_param")); - params["ProductId_param"] = vars.get("$field.PRODUCTID"); - -neon.openContext("OrderItem", "OrderItemEdit_view", null, neon.OPERATINGSTATE_NEW, params); \ No newline at end of file +var recipe = neonFilter.createEntityRecordsRecipeBuilder().parameters(params).toString(); +neon.openContextWithRecipe("OrderItem", "OrderItemEdit_view", recipe, neon.OPERATINGSTATE_NEW); diff --git a/entity/QuickEntry_entity/QuickEntry_entity.aod b/entity/QuickEntry_entity/QuickEntry_entity.aod index 4f248bd6c4139fda9401933bfc65632993df6c2f..bcac4ae14de2cf9ebdf498199540ecde9f22263f 100644 --- a/entity/QuickEntry_entity/QuickEntry_entity.aod +++ b/entity/QuickEntry_entity/QuickEntry_entity.aod @@ -38,6 +38,10 @@ <name>ObjectType_param</name> <valueProcess>%aditoprj%/entity/QuickEntry_entity/entityfields/communications/children/objecttype_param/valueProcess.js</valueProcess> </entityParameter> + <entityParameter> + <name>ContactsMainCountry_param</name> + <valueProcess>%aditoprj%/entity/QuickEntry_entity/entityfields/communications/children/contactsmaincountry_param/valueProcess.js</valueProcess> + </entityParameter> </children> </entityConsumer> <entityConsumer> diff --git a/entity/QuickEntry_entity/entityfields/communications/children/contactsmaincountry_param/valueProcess.js b/entity/QuickEntry_entity/entityfields/communications/children/contactsmaincountry_param/valueProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..d3f1bb434bcac808a57846a6bb6fce7e2e13bab2 --- /dev/null +++ b/entity/QuickEntry_entity/entityfields/communications/children/contactsmaincountry_param/valueProcess.js @@ -0,0 +1,15 @@ +import("Entity_lib"); +import("system.logging"); +import("system.vars"); +import("system.result"); + +//references needed for auto refresh: +"$field.OrgAddresses.insertedRows"; +"$field.OrgAddresses.changedRows"; +"$field.OrgAddresses.deletedRows"; + +var addressRows = EntityConsumerRowsHelper.getCurrentConsumerRows("OrgAddresses", ["COUNTRY"]); +if(addressRows.length > 0) +{ + result.string(addressRows[0]["COUNTRY"]); +} \ No newline at end of file diff --git a/entity/SalesprojectAnalyses_entity/entityfields/openforecast/onActionProcess.js b/entity/SalesprojectAnalyses_entity/entityfields/openforecast/onActionProcess.js index 9fefbbb1bd449bb98340f8e877b522be8474e48e..0e3bed5a84c61de828c70d4db3f2f15c6d9310b7 100644 --- a/entity/SalesprojectAnalyses_entity/entityfields/openforecast/onActionProcess.js +++ b/entity/SalesprojectAnalyses_entity/entityfields/openforecast/onActionProcess.js @@ -1,4 +1,6 @@ +import("system.neonFilter"); import("KeywordRegistry_basic"); import("system.neon"); -neon.openContext("Turnover", null, null, neon.OPERATINGSTATE_SEARCH, null); \ No newline at end of file +var recipe = neonFilter.createEntityRecordsRecipeBuilder().toString(); +neon.openContextWithRecipe("Turnover", null, recipe, neon.OPERATINGSTATE_SEARCH); diff --git a/entity/SalesprojectAnalyses_entity/entityfields/openforecastweighted/onActionProcess.js b/entity/SalesprojectAnalyses_entity/entityfields/openforecastweighted/onActionProcess.js index 9fefbbb1bd449bb98340f8e877b522be8474e48e..0e3bed5a84c61de828c70d4db3f2f15c6d9310b7 100644 --- a/entity/SalesprojectAnalyses_entity/entityfields/openforecastweighted/onActionProcess.js +++ b/entity/SalesprojectAnalyses_entity/entityfields/openforecastweighted/onActionProcess.js @@ -1,4 +1,6 @@ +import("system.neonFilter"); import("KeywordRegistry_basic"); import("system.neon"); -neon.openContext("Turnover", null, null, neon.OPERATINGSTATE_SEARCH, null); \ No newline at end of file +var recipe = neonFilter.createEntityRecordsRecipeBuilder().toString(); +neon.openContextWithRecipe("Turnover", null, recipe, neon.OPERATINGSTATE_SEARCH); diff --git a/entity/SalesprojectAnalyses_entity/entityfields/openplanning/onActionProcess.js b/entity/SalesprojectAnalyses_entity/entityfields/openplanning/onActionProcess.js index 9fefbbb1bd449bb98340f8e877b522be8474e48e..0e3bed5a84c61de828c70d4db3f2f15c6d9310b7 100644 --- a/entity/SalesprojectAnalyses_entity/entityfields/openplanning/onActionProcess.js +++ b/entity/SalesprojectAnalyses_entity/entityfields/openplanning/onActionProcess.js @@ -1,4 +1,6 @@ +import("system.neonFilter"); import("KeywordRegistry_basic"); import("system.neon"); -neon.openContext("Turnover", null, null, neon.OPERATINGSTATE_SEARCH, null); \ No newline at end of file +var recipe = neonFilter.createEntityRecordsRecipeBuilder().toString(); +neon.openContextWithRecipe("Turnover", null, recipe, neon.OPERATINGSTATE_SEARCH); diff --git a/entity/SalesprojectAnalyses_entity/entityfields/opensalesprojects/onActionProcess.js b/entity/SalesprojectAnalyses_entity/entityfields/opensalesprojects/onActionProcess.js index f4db85d3486709981abe865d0121c3d29a09c296..512b5c1952994d0f36622a685071fe8e942b93bf 100644 --- a/entity/SalesprojectAnalyses_entity/entityfields/opensalesprojects/onActionProcess.js +++ b/entity/SalesprojectAnalyses_entity/entityfields/opensalesprojects/onActionProcess.js @@ -1,6 +1,8 @@ +import("system.neonFilter"); import("KeywordRegistry_basic"); import("system.neon"); -neon.openContext("Salesproject", null, null, neon.OPERATINGSTATE_SEARCH, { +var recipe = neonFilter.createEntityRecordsRecipeBuilder().parameters({ "Status_param": $KeywordRegistry.salesprojectState$open() -}); +}).toString(); +neon.openContextWithRecipe("Salesproject", null, recipe, neon.OPERATINGSTATE_SEARCH); diff --git a/entity/SalesprojectAnalyses_entity/entityfields/openturnover/onActionProcess.js b/entity/SalesprojectAnalyses_entity/entityfields/openturnover/onActionProcess.js index 9fefbbb1bd449bb98340f8e877b522be8474e48e..0e3bed5a84c61de828c70d4db3f2f15c6d9310b7 100644 --- a/entity/SalesprojectAnalyses_entity/entityfields/openturnover/onActionProcess.js +++ b/entity/SalesprojectAnalyses_entity/entityfields/openturnover/onActionProcess.js @@ -1,4 +1,6 @@ +import("system.neonFilter"); import("KeywordRegistry_basic"); import("system.neon"); -neon.openContext("Turnover", null, null, neon.OPERATINGSTATE_SEARCH, null); \ No newline at end of file +var recipe = neonFilter.createEntityRecordsRecipeBuilder().toString(); +neon.openContextWithRecipe("Turnover", null, recipe, neon.OPERATINGSTATE_SEARCH); diff --git a/entity/SalesprojectAnalyses_entity/entityfields/sentoffers/onActionProcess.js b/entity/SalesprojectAnalyses_entity/entityfields/sentoffers/onActionProcess.js index 90c452b6404bb557adec63073846a542c8e66e8f..9c90908ec7e26fc78a872ec0705dbf1e58f45444 100644 --- a/entity/SalesprojectAnalyses_entity/entityfields/sentoffers/onActionProcess.js +++ b/entity/SalesprojectAnalyses_entity/entityfields/sentoffers/onActionProcess.js @@ -1,6 +1,8 @@ +import("system.neonFilter"); import("KeywordRegistry_basic"); import("system.neon"); -neon.openContext("Offer", null, null, neon.OPERATINGSTATE_SEARCH, { +var recipe = neonFilter.createEntityRecordsRecipeBuilder().parameters({ "OfferStatus_param": $KeywordRegistry.offerStatus$sent() -}); +}).toString(); +neon.openContextWithRecipe("Offer", null, recipe, neon.OPERATINGSTATE_SEARCH); diff --git a/entity/SalesprojectConversionRate_entity/entityfields/openforecast/onActionProcess.js b/entity/SalesprojectConversionRate_entity/entityfields/openforecast/onActionProcess.js index a4f17e146fc1bc27447f0f53818616a254bcf6d1..bc1d03e6b16ec2c17b720431216cc4e4d2e7f226 100644 --- a/entity/SalesprojectConversionRate_entity/entityfields/openforecast/onActionProcess.js +++ b/entity/SalesprojectConversionRate_entity/entityfields/openforecast/onActionProcess.js @@ -1,7 +1,9 @@ +import("system.neonFilter"); import("KeywordRegistry_basic"); import("system.neon"); -neon.openContext("Turnover", null, null, neon.OPERATINGSTATE_SEARCH, { +var recipe = neonFilter.createEntityRecordsRecipeBuilder().parameters({ "ShowForecast_param": "true", "ShowTurnover_param": "false" -}); +}).toString(); +neon.openContextWithRecipe("Turnover", null, recipe, neon.OPERATINGSTATE_SEARCH); diff --git a/entity/SalesprojectConversionRate_entity/entityfields/opensalesprojects/onActionProcess.js b/entity/SalesprojectConversionRate_entity/entityfields/opensalesprojects/onActionProcess.js index f4db85d3486709981abe865d0121c3d29a09c296..512b5c1952994d0f36622a685071fe8e942b93bf 100644 --- a/entity/SalesprojectConversionRate_entity/entityfields/opensalesprojects/onActionProcess.js +++ b/entity/SalesprojectConversionRate_entity/entityfields/opensalesprojects/onActionProcess.js @@ -1,6 +1,8 @@ +import("system.neonFilter"); import("KeywordRegistry_basic"); import("system.neon"); -neon.openContext("Salesproject", null, null, neon.OPERATINGSTATE_SEARCH, { +var recipe = neonFilter.createEntityRecordsRecipeBuilder().parameters({ "Status_param": $KeywordRegistry.salesprojectState$open() -}); +}).toString(); +neon.openContextWithRecipe("Salesproject", null, recipe, neon.OPERATINGSTATE_SEARCH); diff --git a/entity/SalesprojectConversionRate_entity/entityfields/openturnover/onActionProcess.js b/entity/SalesprojectConversionRate_entity/entityfields/openturnover/onActionProcess.js index b278ec2dce925c93c0fcccbd8689f8ad68f7c781..7afabc19193ae228912af4dba96b5b9a56754f25 100644 --- a/entity/SalesprojectConversionRate_entity/entityfields/openturnover/onActionProcess.js +++ b/entity/SalesprojectConversionRate_entity/entityfields/openturnover/onActionProcess.js @@ -1,7 +1,9 @@ +import("system.neonFilter"); import("KeywordRegistry_basic"); import("system.neon"); -neon.openContext("Turnover", null, null, neon.OPERATINGSTATE_SEARCH, { +var recipe = neonFilter.createEntityRecordsRecipeBuilder().parameters({ "ShowForecast_param": "false", "ShowTurnover_param": "true" -}); +}).toString(); +neon.openContextWithRecipe("Turnover", null, recipe, neon.OPERATINGSTATE_SEARCH); diff --git a/entity/SalesprojectConversionRate_entity/entityfields/sentoffers/onActionProcess.js b/entity/SalesprojectConversionRate_entity/entityfields/sentoffers/onActionProcess.js index 90c452b6404bb557adec63073846a542c8e66e8f..9c90908ec7e26fc78a872ec0705dbf1e58f45444 100644 --- a/entity/SalesprojectConversionRate_entity/entityfields/sentoffers/onActionProcess.js +++ b/entity/SalesprojectConversionRate_entity/entityfields/sentoffers/onActionProcess.js @@ -1,6 +1,8 @@ +import("system.neonFilter"); import("KeywordRegistry_basic"); import("system.neon"); -neon.openContext("Offer", null, null, neon.OPERATINGSTATE_SEARCH, { +var recipe = neonFilter.createEntityRecordsRecipeBuilder().parameters({ "OfferStatus_param": $KeywordRegistry.offerStatus$sent() -}); +}).toString(); +neon.openContextWithRecipe("Offer", null, recipe, neon.OPERATINGSTATE_SEARCH); diff --git a/entity/Salesproject_entity/entityfields/openclassificationoverview/onActionProcess.js b/entity/Salesproject_entity/entityfields/openclassificationoverview/onActionProcess.js index d103f7cdf673de148a7aba47f84f7b033efdcd6c..8d8f060cc77c16c4c50c873cf01813b6542134c4 100644 --- a/entity/Salesproject_entity/entityfields/openclassificationoverview/onActionProcess.js +++ b/entity/Salesproject_entity/entityfields/openclassificationoverview/onActionProcess.js @@ -1,7 +1,9 @@ +import("system.neonFilter"); import("system.neon"); import("ClassificationUpdate_lib"); import("system.vars"); var classificationData = ClassificationUtils.executeUpdating(vars.get("$field.SALESPROJECTID"), "Salesproject"); -neon.openContext("Classification", "ClassificationTree_view", null, neon.OPERATINGSTATE_SEARCH, {"ClassificationContent_param": classificationData["outputValue"]}, null); \ No newline at end of file +var recipe = neonFilter.createEntityRecordsRecipeBuilder().parameters({"ClassificationContent_param": classificationData["outputValue"]}); +neon.openContextWithRecipe("Classification", "ClassificationTree_view", recipe.toString(), neon.OPERATINGSTATE_SEARCH); diff --git a/entity/SearchSync_entity/entityfields/syncentrygroup/children/addsyncentry/onActionProcess.js b/entity/SearchSync_entity/entityfields/syncentrygroup/children/addsyncentry/onActionProcess.js index 315554decad4a4796482f964c5a64a1f7fc085ed..793d49e1be1b8e6702891f04d6d7ecb16cab0142 100644 --- a/entity/SearchSync_entity/entityfields/syncentrygroup/children/addsyncentry/onActionProcess.js +++ b/entity/SearchSync_entity/entityfields/syncentrygroup/children/addsyncentry/onActionProcess.js @@ -50,7 +50,7 @@ asysUsersData.forEach(function ([groupId, name, id, propvalClob]) .leftJoin("ADDRESS", "ADDRESS.ADDRESSID = CONTACT.ADDRESS_ID"); } //from organisation or from person - + if(whereCond) { sqlSyncSizeString.where(whereCond); @@ -59,9 +59,10 @@ asysUsersData.forEach(function ([groupId, name, id, propvalClob]) var syncsize = sqlSyncSizeString.cell(); if(syncsize > maxSyncsize) - { - db.updateData("ASYS_USERS", ["PROPVAL_CLOB"], null, - ["Search greater %0, sync. not possible"], newWhere("ASYS_USERS.ID", syncId), SqlUtils.getBinariesAlias()); + { + newWhere("ASYS_USERS.ID", syncId, undefined, undefined, SqlUtils.getBinariesAlias()).updateFields({ + "PROPVAL_CLOB": "Search greater %0, sync. not possible" + }, "ASYS_USERS"); } }); diff --git a/entity/SearchSync_entity/recordcontainers/db/conditionProcess.js b/entity/SearchSync_entity/recordcontainers/db/conditionProcess.js index 9e28fc745a6ae838030d5e9873338ea11218a16b..acd0e634e76a9b42e6ba976d977d5b2f7c8dd8c1 100644 --- a/entity/SearchSync_entity/recordcontainers/db/conditionProcess.js +++ b/entity/SearchSync_entity/recordcontainers/db/conditionProcess.js @@ -10,5 +10,4 @@ var cond = newWhereIfSet("ASYS_USERS.NAME", userId) .and(newWhereIfSet("ASYS_USERS.PROPKEY", "#FILTER:Organisation_entity.SAVED:%", SqlBuilder.LIKE()) .or("ASYS_USERS.PROPKEY", "#FILTER:Person_entity.SAVED:%", SqlBuilder.LIKE())) .and(newWhereIfSet("ASYS_USERS.PROPKEY != 'SearchSync'")); -logging.log(cond.toString()); result.string(cond.toString()); diff --git a/entity/SerialLetter_entity/recordcontainers/db/onDBInsert.js b/entity/SerialLetter_entity/recordcontainers/db/onDBInsert.js index 683f7df026e987761da1e9e65f961e27f0636324..b8e70bd3b9bac4789fb548e4e2e58ad416366db6 100644 --- a/entity/SerialLetter_entity/recordcontainers/db/onDBInsert.js +++ b/entity/SerialLetter_entity/recordcontainers/db/onDBInsert.js @@ -1,4 +1,3 @@ -import("system.logging"); import("Workflow_lib"); import("Binary_lib"); import("Sql_lib"); @@ -16,7 +15,6 @@ var template = DocumentTemplate.fromUpload(bindata); if (template.content) { - logging.log("inside"); SingleBinaryUtils.insert("SERIALLETTER", "SERIALLETTERFILE", letterId, template.content, template.filename, "", "SERIALLETTER_BUILDED"); } diff --git a/entity/SupportTicket_entity/entityfields/duplicateticket/onActionProcess.js b/entity/SupportTicket_entity/entityfields/duplicateticket/onActionProcess.js index d196ed2bcd7e1aafc02046459d979b44b9abf5fa..23ee55d5f14dcc7f13a798c2b9219dbae92f3f7d 100644 --- a/entity/SupportTicket_entity/entityfields/duplicateticket/onActionProcess.js +++ b/entity/SupportTicket_entity/entityfields/duplicateticket/onActionProcess.js @@ -1,13 +1,13 @@ +import("system.neonFilter"); import("Sql_lib"); import("system.neon"); import("system.vars"); var obj_links = { - PresetLinks_param :JSON.stringify([["Supportticket",vars.get("$field.TICKETID")]]), TicketId_param: vars.get("$field.TICKETID"), TicketNo_param: vars.get("$field.CODE"), ActionName_param: "duplicateTicket" }; -neon.openContext("SupportTicket", "SupportTicketEdit_view", null, neon.OPERATINGSTATE_NEW, obj_links); - +var recipe = neonFilter.createEntityRecordsRecipeBuilder().parameters(obj_links).toString(); +neon.openContextWithRecipe("SupportTicket", "SupportTicketEdit_view", recipe, neon.OPERATINGSTATE_NEW); diff --git a/entity/SupportTicket_entity/entityfields/filteractionsgroup/children/changemultiple/onActionProcess.js b/entity/SupportTicket_entity/entityfields/filteractionsgroup/children/changemultiple/onActionProcess.js index dcc1197652bdf6655d8cc596f9fbb21fc928046a..ad130a7685e337832f4793e8dc889a237066aa2a 100644 --- a/entity/SupportTicket_entity/entityfields/filteractionsgroup/children/changemultiple/onActionProcess.js +++ b/entity/SupportTicket_entity/entityfields/filteractionsgroup/children/changemultiple/onActionProcess.js @@ -1,3 +1,4 @@ +import("system.neonFilter"); import("system.db"); import("system.neon"); import("system.vars"); @@ -27,6 +28,6 @@ if(vars.exists("$sys.selectionRows")) "InboxIds_param": JSON.stringify(inboxIds) } - neon.openContext("SupportTicketMultiSelect", "SupportTicketMultiSelectEdit_view", null, neon.OPERATINGSTATE_VIEW, params); - -} \ No newline at end of file + var recipe = neonFilter.createEntityRecordsRecipeBuilder().parameters(params).toString(); + neon.openContextWithRecipe("SupportTicketMultiSelect", "SupportTicketMultiSelectEdit_view", recipe, neon.OPERATINGSTATE_VIEW); +} diff --git a/entity/SupportTicket_entity/entityfields/forwardticket/onActionProcess.js b/entity/SupportTicket_entity/entityfields/forwardticket/onActionProcess.js index be96f60fe8f8bee758038e3f3078b0cec9175af0..fdbe02245dfd741d6b0802da4e90ca308bbdd41a 100644 --- a/entity/SupportTicket_entity/entityfields/forwardticket/onActionProcess.js +++ b/entity/SupportTicket_entity/entityfields/forwardticket/onActionProcess.js @@ -1,3 +1,4 @@ +import("system.neonFilter"); import("system.db"); import("system.neon"); import("system.vars"); @@ -29,4 +30,5 @@ else params["From_param"] = vars.get("$field.EMAILMAILSIGNATURE"); } -neon.openContext("ServiceEmail", "ServiceForwardEmailEdit_view", null, neon.OPERATINGSTATE_NEW, params); \ No newline at end of file +var recipe = neonFilter.createEntityRecordsRecipeBuilder().parameters(params).toString(); +neon.openContextWithRecipe("ServiceEmail", "ServiceForwardEmailEdit_view", recipe, neon.OPERATINGSTATE_NEW); diff --git a/entity/SupportTicket_entity/entityfields/newletter/onActionProcess.js b/entity/SupportTicket_entity/entityfields/newletter/onActionProcess.js index 4066bead87bcfe4070031d5094d4fac0e23416b5..7e1e84dab18c2202c3b89bcd138f130d27eb0fe6 100644 --- a/entity/SupportTicket_entity/entityfields/newletter/onActionProcess.js +++ b/entity/SupportTicket_entity/entityfields/newletter/onActionProcess.js @@ -1,11 +1,13 @@ +import("system.neonFilter"); import("system.neon"); import("system.vars"); var params = { - "ContactId_param" : vars.get("$field.TASK_REQUESTOR_CONTACT_ID"), - "ComingFrom_param" : vars.get("$sys.currentcontextname"), - "ActionName_param" : "ServiceLetter", - "TicketCategory_param" : vars.get("$field.TICKETCATEGORY") - }; + "ContactId_param": vars.get("$field.TASK_REQUESTOR_CONTACT_ID"), + "ComingFrom_param": vars.get("$sys.currentcontextname"), + "ActionName_param": "ServiceLetter", + "TicketCategory_param": vars.get("$field.TICKETCATEGORY") +}; -neon.openContext("Letter", "LetterEdit_view", null, neon.OPERATINGSTATE_VIEW, params) \ No newline at end of file +var recipe = neonFilter.createEntityRecordsRecipeBuilder().parameters(params).toString(); +neon.openContextWithRecipe("Letter", "LetterEdit_view", recipe, neon.OPERATINGSTATE_VIEW); diff --git a/entity/SupportTicket_entity/entityfields/newnote/onActionProcess.js b/entity/SupportTicket_entity/entityfields/newnote/onActionProcess.js index 17e7ed9b446f272035cb78b269f391350867e42e..2f225fedd709bbfec90667b30a72c95383c086fb 100644 --- a/entity/SupportTicket_entity/entityfields/newnote/onActionProcess.js +++ b/entity/SupportTicket_entity/entityfields/newnote/onActionProcess.js @@ -1,3 +1,4 @@ +import("system.neonFilter"); import("Context_lib"); import("system.translate"); import("system.datetime"); @@ -7,7 +8,7 @@ import("system.neon"); import("system.vars"); import("Ticket_lib") -var params ={ +var params = { "Entrydate_param" : datetime.date(), "Category_param" : $KeywordRegistry.activityCategory$note(), "Direction_param" : $KeywordRegistry.activityDirection$internal(), @@ -15,5 +16,7 @@ var params ={ "Subject_param": translate.text("Note"), "ParentId_param": vars.get("$field.TICKETID"), "ParentContext_param": ContextUtils.getCurrentContextId() - } -neon.openContext("Activity", "ActivityNoteEdit_view", null, neon.OPERATINGSTATE_NEW, params); \ No newline at end of file +}; + +var recipe = neonFilter.createEntityRecordsRecipeBuilder().parameters(params).toString(); +neon.openContextWithRecipe("Activity", "ActivityNoteEdit_view", recipe, neon.OPERATINGSTATE_NEW); diff --git a/entity/SupportTicket_entity/entityfields/newticket/onActionProcess.js b/entity/SupportTicket_entity/entityfields/newticket/onActionProcess.js index 6c21413ab83e7106f94aef7aec9c1b7be3cde702..d37748c9e092033cb41c852b018f4a70dcee97de 100644 --- a/entity/SupportTicket_entity/entityfields/newticket/onActionProcess.js +++ b/entity/SupportTicket_entity/entityfields/newticket/onActionProcess.js @@ -1,4 +1,6 @@ +import("system.neonFilter"); import("system.neon"); import("Ticket_lib") -neon.openContext("SupportTicket", "SupportTicketEdit_view", null, neon.OPERATINGSTATE_NEW, null); \ No newline at end of file +var recipe = neonFilter.createEntityRecordsRecipeBuilder().toString(); +neon.openContextWithRecipe("SupportTicket", "SupportTicketEdit_view", recipe, neon.OPERATINGSTATE_NEW); diff --git a/entity/SupportTicket_entity/entityfields/newticketcontact/onActionProcess.js b/entity/SupportTicket_entity/entityfields/newticketcontact/onActionProcess.js index b9de4020cf3efddc0e5b798ba33037a275181fac..d9b2c2b838465fa31530e6475f0393494818d090 100644 --- a/entity/SupportTicket_entity/entityfields/newticketcontact/onActionProcess.js +++ b/entity/SupportTicket_entity/entityfields/newticketcontact/onActionProcess.js @@ -1,4 +1,6 @@ +import("system.neonFilter"); import("system.neon"); import("Ticket_lib") -neon.openContext("Person", "PersonEditServiceTicket_view", null, neon.OPERATINGSTATE_NEW, null); \ No newline at end of file +var recipe = neonFilter.createEntityRecordsRecipeBuilder().toString(); +neon.openContextWithRecipe("Person", "PersonEditServiceTicket_view", recipe, neon.OPERATINGSTATE_NEW); diff --git a/entity/SupportTicket_entity/entityfields/pullnextticket/onActionProcess.js b/entity/SupportTicket_entity/entityfields/pullnextticket/onActionProcess.js index b6abe33312fe99408c6e0c25619889b7425cada8..76b69d104eae58f8288cfbcf1323cfc72a483ad7 100644 --- a/entity/SupportTicket_entity/entityfields/pullnextticket/onActionProcess.js +++ b/entity/SupportTicket_entity/entityfields/pullnextticket/onActionProcess.js @@ -1,3 +1,4 @@ +import("system.neonFilter"); import("Util_lib"); import("system.translate"); import("system.question"); @@ -36,6 +37,7 @@ else { var myRules = new SqlBuilder() .selectDistinct("EMPLOYEEGROUP.COND") + .from("EMPLOYEEGROUP") .join("EMPLOYEEGROUP_CONTACT_RELATION","EMPLOYEEGROUP_CONTACT_RELATION.EMPLOYEEGROUP_ID = employeegroup.EMPLOYEEGROUPID") .join("EMPLOYEEGROUP_RULEGROUP_RELATION","EMPLOYEEGROUP.EMPLOYEEGROUPID = EMPLOYEEGROUP_RULEGROUP_RELATION.EMPLOYEEGROUP_ID") .join("EMPLOYEEGROUP_RULEGROUP","EMPLOYEEGROUP_RULEGROUP.EMPLOYEEGROUP_RULEGROUPID = EMPLOYEEGROUP_RULEGROUP_RELATION.EMPLOYEEGROUP_RULEGROUP_ID") @@ -123,7 +125,8 @@ if(ticketID != "") newWhereIfSet("TICKET.TICKETID", vars.get( "$field.TICKETID")).updateFields(TicketfieldValues); newWhereIfSet("TASK.TASKID",taskID).updateFields(TaskfieldValues); // open Ticket - neon.openContext("SupportTicket", "SupportTicketMain_view", [ticketID], neon.OPERATINGSTATE_VIEW, null); + var recipe = neonFilter.createEntityRecordsRecipeBuilder().uidsIncludelist([ticketID]).toString(); + neon.openContextWithRecipe("SupportTicket", "SupportTicketMain_view", recipe, neon.OPERATINGSTATE_VIEW); } // no Ticket available.. nothing found else diff --git a/entity/SupportTicket_entity/entityfields/replyemail/onActionProcess.js b/entity/SupportTicket_entity/entityfields/replyemail/onActionProcess.js index 1b8ba2a613f47f46625ccbadb58632dbb51d4f68..c6e43165d64f123873d6581ce5e1fb3740c54394 100644 --- a/entity/SupportTicket_entity/entityfields/replyemail/onActionProcess.js +++ b/entity/SupportTicket_entity/entityfields/replyemail/onActionProcess.js @@ -1,3 +1,4 @@ +import("system.neonFilter"); import("KeywordRegistry_basic"); import("system.db"); import("system.neon"); @@ -39,4 +40,5 @@ else params["SenderEmail_param"] = vars.get("$field.SENDEREMAIL"); } -neon.openContext("ServiceEmail", "ServiceEmailEdit_view", null, neon.OPERATINGSTATE_NEW, params); \ No newline at end of file +var recipe = neonFilter.createEntityRecordsRecipeBuilder().parameters(params).toString(); +neon.openContextWithRecipe("ServiceEmail", "ServiceEmailEdit_view", recipe, neon.OPERATINGSTATE_NEW); diff --git a/entity/SupportTicket_entity/entityfields/resubmitticket/onActionProcess.js b/entity/SupportTicket_entity/entityfields/resubmitticket/onActionProcess.js index 54c8ced3dfe31067daefe243fa00f8935bf548ab..eff8f28129374a3fc22791ba386a25a3ee11230d 100644 --- a/entity/SupportTicket_entity/entityfields/resubmitticket/onActionProcess.js +++ b/entity/SupportTicket_entity/entityfields/resubmitticket/onActionProcess.js @@ -1,3 +1,4 @@ +import("system.neonFilter"); import("system.db"); import("system.util"); import("system.tools"); @@ -14,6 +15,7 @@ var params = { "ActionName_param" : "resubmitTicket" }; -neon.openContext("SupportTicket", "SupportTicketEditResubmission_view", [vars.get("$field.TICKETID")], neon.OPERATINGSTATE_EDIT, params); +var recipe = neonFilter.createEntityRecordsRecipeBuilder().uidsIncludelist([vars.get("$field.TICKETID")]).parameters(params); +neon.openContextWithRecipe("SupportTicket", "SupportTicketEditResubmission_view", recipe.toString(), neon.OPERATINGSTATE_EDIT); diff --git a/entity/SupportTicket_entity/entityfields/returnticket/onActionProcess.js b/entity/SupportTicket_entity/entityfields/returnticket/onActionProcess.js index 4f2b2c1fff126ddff1213154dad421d6e55fb720..0bc9ded371b08d2aeeda410059c6c523bdee7828 100644 --- a/entity/SupportTicket_entity/entityfields/returnticket/onActionProcess.js +++ b/entity/SupportTicket_entity/entityfields/returnticket/onActionProcess.js @@ -1,3 +1,4 @@ +import("system.neonFilter"); import("KeywordRegistry_basic"); import("Employee_lib"); import("Sql_lib"); @@ -10,7 +11,8 @@ if (vars.get("$field.TICKET_EDITOR_CONTACT_ID")) "ActionName_param" : "returnTicket" }; - neon.openContext("SupportTicket", "SupportTicketEditReturn_view", [vars.get("$field.TICKETID")], neon.OPERATINGSTATE_EDIT, params); + var recipe = neonFilter.createEntityRecordsRecipeBuilder().uidsIncludelist([vars.get("$field.TICKETID")]).parameters(params); + neon.openContextWithRecipe("SupportTicket", "SupportTicketEditReturn_view", recipe.toString(), neon.OPERATINGSTATE_EDIT); } else { diff --git a/entity/Synccontact_entity/entityfields/lastrunoutlook/valueProcess.js b/entity/Synccontact_entity/entityfields/lastrunoutlook/valueProcess.js index 42d788931ecd91e59f5e0efef42bda7b0ed44f81..faed63099eef6898f65bf7ce1f0e24127d51c5fd 100644 --- a/entity/Synccontact_entity/entityfields/lastrunoutlook/valueProcess.js +++ b/entity/Synccontact_entity/entityfields/lastrunoutlook/valueProcess.js @@ -7,4 +7,4 @@ import("system.db"); var lastRun = newSelect("ASYS_TIMERS_SERVERRUNS.LASTRUN", SqlUtils.getSystemAlias()).from("ASYS_TIMERS_SERVERRUNS") .where("ASYS_TIMERS_SERVERRUNS.TIMERID", "EwsSyncToExchange_serverProcess.process").cell(); -result.string(datetime.toDate(lastRun, translate.text("dd/MM/yyyy HH:mm"), "UTC")); \ No newline at end of file +result.string(datetime.toDate(lastRun, translate.text("dd/MM/yyyy HH:mm"))); \ No newline at end of file diff --git a/entity/Synccontact_entity/entityfields/lastrunsynctable/valueProcess.js b/entity/Synccontact_entity/entityfields/lastrunsynctable/valueProcess.js index 0400aa23d5bae78f8da36f724573cda6d865fa21..c7f42ba9dc499ae39ba15707d6d684c863824e81 100644 --- a/entity/Synccontact_entity/entityfields/lastrunsynctable/valueProcess.js +++ b/entity/Synccontact_entity/entityfields/lastrunsynctable/valueProcess.js @@ -8,4 +8,4 @@ var lastRun = newSelect("ASYS_TIMERS_SERVERRUNS.LASTRUN", SqlUtils.getSystemAlia .from("ASYS_TIMERS_SERVERRUNS") .where("ASYS_TIMERS_SERVERRUNS.TIMERID", "EwsSyncContact_serverProcess.process").cell(); -result.string(datetime.toDate(lastRun, translate.text("dd/MM/yyyy HH:mm"), "UTC")); \ No newline at end of file +result.string(datetime.toDate(lastRun, translate.text("dd/MM/yyyy HH:mm"))); \ No newline at end of file diff --git a/entity/SyncedSearches_entity/entityfields/exportfilter/children/exportfiltertocontacts/onActionProcess.js b/entity/SyncedSearches_entity/entityfields/exportfilter/children/exportfiltertocontacts/onActionProcess.js index c88781d813cc5f841e7b46f72c5282fb86772b40..a786f84bc9b216194760b52c855360c4fa4e78cd 100644 --- a/entity/SyncedSearches_entity/entityfields/exportfilter/children/exportfiltertocontacts/onActionProcess.js +++ b/entity/SyncedSearches_entity/entityfields/exportfilter/children/exportfiltertocontacts/onActionProcess.js @@ -1,3 +1,4 @@ +import("system.neonFilter"); import("system.neon"); import("system.db"); import("system.vars"); @@ -16,9 +17,9 @@ var params = if(groupId == "Organisation_entity") { - neon.openContext("Organisation", "OrganisationFilter_view", null, neon.OPERATINGSTATE_SEARCH, params); + neon.openContextWithRecipe("Organisation", "OrganisationFilter_view", neonFilter.createEntityRecordsRecipeBuilder().parameters(params).toString(), neon.OPERATINGSTATE_SEARCH); } else { - neon.openContext("Person", "PersonFilter_view", null, neon.OPERATINGSTATE_SEARCH, params); + neon.openContextWithRecipe("Person", "PersonFilter_view", neonFilter.createEntityRecordsRecipeBuilder().parameters(params).toString(), neon.OPERATINGSTATE_SEARCH); } \ No newline at end of file diff --git a/entity/Task_entity/entityfields/filteractiongroup/children/setcomplete/onActionProcess.js b/entity/Task_entity/entityfields/filteractiongroup/children/setcomplete/onActionProcess.js index 3a57f271c622082bac9341b1b4932fc7538f0613..07877fec5e23c2f5bf41fcaa7a2cb9e1a876c80d 100644 --- a/entity/Task_entity/entityfields/filteractiongroup/children/setcomplete/onActionProcess.js +++ b/entity/Task_entity/entityfields/filteractiongroup/children/setcomplete/onActionProcess.js @@ -1,12 +1,17 @@ -import("system.neon"); -import("Sql_lib"); +import("KeywordRegistry_basic"); +import("system.entities"); import("system.vars"); -import("system.db"); -import("KeywordRegistry_basic") -var data = vars.get("$sys.selection") +var selection = vars.get("$sys.selection"); -var cond = newWhere("TASK.TASKID", data, SqlBuilder.IN()).toString(); -db.updateData("TASK", ["STATUS"], null, [$KeywordRegistry.taskStatus$ended()], cond) +var updateConfig = entities.createConfigForUpdatingRows() +.entity("Task_entity") +.fieldValues({ + "STATUS": $KeywordRegistry.taskStatus$ended() +}); -neon.refreshAll() \ No newline at end of file +selection.forEach(function (dataRow) +{ + updateConfig.uid(dataRow); + entities.updateRow(updateConfig); +}); diff --git a/entity/Task_entity/entityfields/setcompletepreview/onActionProcess.js b/entity/Task_entity/entityfields/setcompletepreview/onActionProcess.js index 3a57f271c622082bac9341b1b4932fc7538f0613..27d469990734d92b3f4005bc5e6dfcd490d2603c 100644 --- a/entity/Task_entity/entityfields/setcompletepreview/onActionProcess.js +++ b/entity/Task_entity/entityfields/setcompletepreview/onActionProcess.js @@ -1,12 +1,12 @@ -import("system.neon"); -import("Sql_lib"); import("system.vars"); -import("system.db"); -import("KeywordRegistry_basic") +import("KeywordRegistry_basic"); +import("system.entities"); -var data = vars.get("$sys.selection") +var updateConfig = entities.createConfigForUpdatingRows() +.entity("Task_entity") +.fieldValues({ + "STATUS": $KeywordRegistry.taskStatus$ended() +}); -var cond = newWhere("TASK.TASKID", data, SqlBuilder.IN()).toString(); -db.updateData("TASK", ["STATUS"], null, [$KeywordRegistry.taskStatus$ended()], cond) - -neon.refreshAll() \ No newline at end of file +updateConfig.uid(vars.get("$field.TASKID")); +entities.updateRow(updateConfig); \ No newline at end of file diff --git a/entity/Timetracking_entity/Timetracking_entity.aod b/entity/Timetracking_entity/Timetracking_entity.aod index bf1a1db9fba9419d9198653e83b435aeaab716ee..8422d4687aa6e2472177ba1ef03a40b9d3be69f7 100644 --- a/entity/Timetracking_entity/Timetracking_entity.aod +++ b/entity/Timetracking_entity/Timetracking_entity.aod @@ -114,6 +114,10 @@ <name>#PROVIDER_AGGREGATES</name> <useAggregates v="true" /> </entityProvider> + <entityField> + <name>PICTURE</name> + <contentType>IMAGE</contentType> + </entityField> </entityFields> <recordContainers> <dbRecordContainer> @@ -154,6 +158,10 @@ <name>TRACKINGMINUTES.value</name> <recordfield>TIMETRACKING.TRACKINGMINUTES</recordfield> </dbRecordFieldMapping> + <dbRecordFieldMapping> + <name>PICTURE.value</name> + <expression>%aditoprj%/entity/Timetracking_entity/recordcontainers/db/recordfieldmappings/picture.value/expression.js</expression> + </dbRecordFieldMapping> </recordFieldMappings> <linkInformation> <linkInformation> diff --git a/entity/Timetracking_entity/recordcontainers/db/recordfieldmappings/contact_id.displayvalue/expression.js b/entity/Timetracking_entity/recordcontainers/db/recordfieldmappings/contact_id.displayvalue/expression.js index 418c211fe3d6f213831fc5ab04518e71c1fc8910..e6b609c1fc27ba9f613f00d757d38d0aa240249c 100644 --- a/entity/Timetracking_entity/recordcontainers/db/recordfieldmappings/contact_id.displayvalue/expression.js +++ b/entity/Timetracking_entity/recordcontainers/db/recordfieldmappings/contact_id.displayvalue/expression.js @@ -1,4 +1,4 @@ import("system.result"); import("Person_lib"); -result.string(PersUtils.getResolvingDisplaySubSql("CONTACT_ID")) \ No newline at end of file +result.string(PersUtils.getResolvingDisplaySubSql("CONTACT_ID")); \ No newline at end of file diff --git a/entity/Timetracking_entity/recordcontainers/db/recordfieldmappings/picture.value/expression.js b/entity/Timetracking_entity/recordcontainers/db/recordfieldmappings/picture.value/expression.js new file mode 100644 index 0000000000000000000000000000000000000000..e1797504c14451f6349ae639ad2ae06cb1ed27b5 --- /dev/null +++ b/entity/Timetracking_entity/recordcontainers/db/recordfieldmappings/picture.value/expression.js @@ -0,0 +1,14 @@ +import("Person_lib"); +import("KeywordRegistry_basic"); +import("Keyword_lib"); +import("system.result"); +import("Sql_lib"); + +var sqlMask = new SqlMaskingUtils(); + +var sql = sqlMask.concatenate(["'TEXT:'", "(" + newSelect(sqlMask.concatenate(["FIRSTNAME, ' ', LASTNAME"])) + .from("PERSON") + .join("CONTACT", "PERSON_ID = PERSONID") + .where("CONTACT.CONTACTID = TIMETRACKING.CONTACT_ID") + ")"]); + +result.string(sql.toString()); \ No newline at end of file diff --git a/entity/TopicTree_entity/TopicTree_entity.aod b/entity/TopicTree_entity/TopicTree_entity.aod index 77c63df74be4bcd7f727f4f69fb3789554ffc7e5..a1f57a287242fa31a59c821b2ea0f24869d45e27 100644 --- a/entity/TopicTree_entity/TopicTree_entity.aod +++ b/entity/TopicTree_entity/TopicTree_entity.aod @@ -103,6 +103,7 @@ <name>first</name> <title>First</title> <onActionProcess>%aditoprj%/entity/TopicTree_entity/entityfields/more/children/first/onActionProcess.js</onActionProcess> + <isObjectAction v="false" /> <iconId>VAADIN:ANGLE_DOUBLE_UP</iconId> <stateProcess>%aditoprj%/entity/TopicTree_entity/entityfields/more/children/first/stateProcess.js</stateProcess> </entityActionField> @@ -110,6 +111,7 @@ <name>moveUp</name> <title>Move Up</title> <onActionProcess>%aditoprj%/entity/TopicTree_entity/entityfields/more/children/moveup/onActionProcess.js</onActionProcess> + <isObjectAction v="false" /> <iconId>VAADIN:ANGLE_UP</iconId> <stateProcess>%aditoprj%/entity/TopicTree_entity/entityfields/more/children/moveup/stateProcess.js</stateProcess> </entityActionField> @@ -117,6 +119,7 @@ <name>moveDown</name> <title>Move Down</title> <onActionProcess>%aditoprj%/entity/TopicTree_entity/entityfields/more/children/movedown/onActionProcess.js</onActionProcess> + <isObjectAction v="false" /> <iconId>VAADIN:ANGLE_DOWN</iconId> <stateProcess>%aditoprj%/entity/TopicTree_entity/entityfields/more/children/movedown/stateProcess.js</stateProcess> </entityActionField> @@ -124,6 +127,7 @@ <name>last</name> <title>Last</title> <onActionProcess>%aditoprj%/entity/TopicTree_entity/entityfields/more/children/last/onActionProcess.js</onActionProcess> + <isObjectAction v="false" /> <iconId>VAADIN:ANGLE_DOUBLE_DOWN</iconId> <stateProcess>%aditoprj%/entity/TopicTree_entity/entityfields/more/children/last/stateProcess.js</stateProcess> </entityActionField> @@ -146,6 +150,7 @@ <title>Paste as Top Topic</title> <onActionProcess>%aditoprj%/entity/TopicTree_entity/entityfields/more/children/pasteastoptopic/onActionProcess.js</onActionProcess> <iconId>VAADIN:PASTE</iconId> + <stateProcess>%aditoprj%/entity/TopicTree_entity/entityfields/more/children/pasteastoptopic/stateProcess.js</stateProcess> </entityActionField> <entityActionField> <name>cut</name> @@ -168,6 +173,7 @@ <name>createChildTopic</name> <title>Create Child Topic</title> <onActionProcess>%aditoprj%/entity/TopicTree_entity/entityfields/createexpand/children/createchildtopic/onActionProcess.js</onActionProcess> + <selectionType>MULTI</selectionType> <iconId>VAADIN:FILE_TREE_SMALL</iconId> <stateProcess>%aditoprj%/entity/TopicTree_entity/entityfields/createexpand/children/createchildtopic/stateProcess.js</stateProcess> </entityActionField> @@ -175,6 +181,7 @@ <name>expand</name> <title>Expand</title> <onActionProcess>%aditoprj%/entity/TopicTree_entity/entityfields/createexpand/children/expand/onActionProcess.js</onActionProcess> + <isObjectAction v="false" /> <iconId>VAADIN:EXPAND</iconId> </entityActionField> </children> @@ -296,6 +303,9 @@ <jDitoRecordFieldMapping> <name>expanded.value</name> </jDitoRecordFieldMapping> + <jDitoRecordFieldMapping> + <name>ACTIVE.displayValue</name> + </jDitoRecordFieldMapping> </recordFieldMappings> </jDitoRecordContainer> </recordContainers> diff --git a/entity/TopicTree_entity/entityfields/createexpand/children/createchildtopic/onActionProcess.js b/entity/TopicTree_entity/entityfields/createexpand/children/createchildtopic/onActionProcess.js index 5eae62bae3e11f29a89e179b0731d78146fb1cec..6e11443e9dda8a886c5a8585b8fd195a78c058d5 100644 --- a/entity/TopicTree_entity/entityfields/createexpand/children/createchildtopic/onActionProcess.js +++ b/entity/TopicTree_entity/entityfields/createexpand/children/createchildtopic/onActionProcess.js @@ -1,12 +1,13 @@ +import("system.neonFilter"); import("system.vars"); import("system.neon"); import("Attribute_lib"); var params = {}; -if (vars.exists("$local.rows")) +if (vars.exists("$sys.selection")) { - var row = vars.get("$local.rows"); - var topicTreeId = row[0].UID; + var row = vars.get("$sys.selection"); + var topicTreeId = row[0]; params["AssignedToId_param"] = topicTreeId; } -neon.openContext("TopicTree", null, null, neon.OPERATINGSTATE_NEW, params); \ No newline at end of file +neon.openContextWithRecipe("TopicTree", "TopicTreeEdit_view", neonFilter.createEntityRecordsRecipeBuilder().parameters(params).toString(), neon.OPERATINGSTATE_NEW); \ No newline at end of file diff --git a/entity/TopicTree_entity/entityfields/more/children/copy/onActionProcess.js b/entity/TopicTree_entity/entityfields/more/children/copy/onActionProcess.js index 57a556f9aa25ce88f956118455d9abf8d44be7c6..04b811522dd2345d2ed9a5804b39af8e1eed7479 100644 --- a/entity/TopicTree_entity/entityfields/more/children/copy/onActionProcess.js +++ b/entity/TopicTree_entity/entityfields/more/children/copy/onActionProcess.js @@ -3,6 +3,6 @@ import("system.vars"); var topicDatSet = vars.get("$sys.selectionRows")[0]; -vars.set("$context.Cut", null); +vars.set("$context.HasToBeCut", false); vars.set("$context.Copied", JSON.stringify({dataset: topicDatSet , amountOfLayers: TopicTreeUtils.getAmountOfLayers(topicDatSet)})); \ No newline at end of file diff --git a/entity/TopicTree_entity/entityfields/more/children/cut/onActionProcess.js b/entity/TopicTree_entity/entityfields/more/children/cut/onActionProcess.js index ea2dc5ba77ff322b0a436169ef710d980e15e930..0de3d45cd47a69ec2c21c7667178f5540f52ae6f 100644 --- a/entity/TopicTree_entity/entityfields/more/children/cut/onActionProcess.js +++ b/entity/TopicTree_entity/entityfields/more/children/cut/onActionProcess.js @@ -5,4 +5,4 @@ var topicDatSet = vars.get("$sys.selectionRows")[0]; vars.set("$context.Copied", JSON.stringify({dataset: topicDatSet , amountOfLayers: TopicTreeUtils.getAmountOfLayers(topicDatSet)})); -vars.set("$context.Cut", true); \ No newline at end of file +vars.set("$context.HasToBeCut", true); \ No newline at end of file diff --git a/entity/TopicTree_entity/entityfields/more/children/paste/stateProcess.js b/entity/TopicTree_entity/entityfields/more/children/paste/stateProcess.js index d9a90bf3d4f2e10faa0444dd98e311c5340d95d2..b3d1749a90e97dfa9eb17f2796232285e65dd2b6 100644 --- a/entity/TopicTree_entity/entityfields/more/children/paste/stateProcess.js +++ b/entity/TopicTree_entity/entityfields/more/children/paste/stateProcess.js @@ -14,7 +14,7 @@ if(selection && vars.exists("$context.Copied")) if(eMath.addInt(amountOfLayers, layer) <= TopicTreeUtils.getArrayLayers().length)//this tree doesn't work endlessly, so we can*t allow the user to create more layers than we allow { - if(vars.get("$context.Cut")) + if(vars.get("$context.HasToBeCut")) { var copiedTopicTreeId = JSON.parse(vars.get("$context.Copied"))["dataset"]; var topicTreeIds = TopicTreeUtils.getSubTopicIds(copiedTopicTreeId); diff --git a/entity/TopicTree_entity/entityfields/more/children/pasteastoptopic/stateProcess.js b/entity/TopicTree_entity/entityfields/more/children/pasteastoptopic/stateProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..e05385b429fb3a0372ad6aeffa97aa77c6fc5784 --- /dev/null +++ b/entity/TopicTree_entity/entityfields/more/children/pasteastoptopic/stateProcess.js @@ -0,0 +1,10 @@ +import("system.result"); +import("system.vars"); +import("system.neon"); + +var state = neon.COMPONENTSTATE_DISABLED; +if(vars.exists("$context.Copied") && vars.get("$context.Copied")) +{ + state = neon.COMPONENTSTATE_EDITABLE; +} +result.string(state); \ No newline at end of file diff --git a/entity/UnlinkedMail_entity/entityfields/toactivity_actiongroup/children/toactivity_action/onActionProcess.js b/entity/UnlinkedMail_entity/entityfields/toactivity_actiongroup/children/toactivity_action/onActionProcess.js index 773f204fd3e645dfc9e94e7e5b3f3bf3cdfd05a2..3ecf1ba519fb53351c55c21690d55d18b41e20c4 100644 --- a/entity/UnlinkedMail_entity/entityfields/toactivity_actiongroup/children/toactivity_action/onActionProcess.js +++ b/entity/UnlinkedMail_entity/entityfields/toactivity_actiongroup/children/toactivity_action/onActionProcess.js @@ -1,3 +1,4 @@ +import("system.neonFilter"); import("Employee_lib"); import("system.neon"); import("system.mail"); @@ -9,7 +10,8 @@ var incomingMailExec = new IncomingEmailExecutor(mailObj); if (incomingMailExec.isUnlinkable()) { //helper context and entity for configuring the linking, further working (linking, creating activities, etc.) is done there - neon.openContext("UnlinkedMailMappingWrapper", null, ["1"], neon.OPERATINGSTATE_EDIT, {"UnlinkedMailId_param": vars.get("$sys.uid")}); + var recipe = neonFilter.createEntityRecordsRecipeBuilder().uidsIncludelist(["1"]).parameters({"UnlinkedMailId_param": vars.get("$sys.uid")}); + neon.openContextWithRecipe("UnlinkedMailMappingWrapper", null, recipe.toString(), neon.OPERATINGSTATE_EDIT); } else { diff --git a/entity/VisitPlanEntry_entity/entityfields/entityactiongroup/children/newappointment/onActionProcess.js b/entity/VisitPlanEntry_entity/entityfields/entityactiongroup/children/newappointment/onActionProcess.js index 74be6d74eb7c8498d52842ef89eafe4ad20efd27..d88392c1eb31d3432afe9dbd868be0a952256385 100644 --- a/entity/VisitPlanEntry_entity/entityfields/entityactiongroup/children/newappointment/onActionProcess.js +++ b/entity/VisitPlanEntry_entity/entityfields/entityactiongroup/children/newappointment/onActionProcess.js @@ -1,3 +1,4 @@ +import("system.neonFilter"); import("Util_lib"); import("system.result"); import("system.neon"); @@ -59,5 +60,6 @@ params = { }; -neon.openContext("Appointment", "AppointmentEdit_view", [vars.get("$field.VISITPLANENTRYID")], neon.OPERATINGSTATE_NEW, params, null); +var recipe = neonFilter.createEntityRecordsRecipeBuilder().uidsIncludelist([vars.get("$field.VISITPLANENTRYID")]).parameters(params); +neon.openContextWithRecipe("Appointment", "AppointmentEdit_view", recipe.toString(), neon.OPERATINGSTATE_NEW); result.string(true); diff --git a/entity/VisitRecommendation_entity/entityfields/newentrygroup/children/newvisitplaneentry/onActionProcess.js b/entity/VisitRecommendation_entity/entityfields/newentrygroup/children/newvisitplaneentry/onActionProcess.js index cf79e9774522847b458a6ef8fd04e2ee74d9ad15..063d11b344789c4221e8958e89972da74a6831ef 100644 --- a/entity/VisitRecommendation_entity/entityfields/newentrygroup/children/newvisitplaneentry/onActionProcess.js +++ b/entity/VisitRecommendation_entity/entityfields/newentrygroup/children/newvisitplaneentry/onActionProcess.js @@ -1,3 +1,4 @@ +import("system.neonFilter"); import("system.db"); import("system.neon"); import("system.vars"); @@ -12,4 +13,5 @@ params["Entrydate_param"] = vars.get("$field.DUE_DATE"); params["PrioritySource_param"] = vars.get("$field.PRIORITY_SOURCE"); params["VisitrecommendationId_param"] = vars.get("$field.UID"); -neon.openContext("VisitPlanEntry", "VisitPlanEntryEdit_view", null, neon.OPERATINGSTATE_NEW, params); \ No newline at end of file +var recipe = neonFilter.createEntityRecordsRecipeBuilder().parameters(params).toString(); +neon.openContextWithRecipe("VisitPlanEntry", "VisitPlanEntryEdit_view", recipe, neon.OPERATINGSTATE_NEW); diff --git a/entity/Weblink_entity/Weblink_entity.aod b/entity/Weblink_entity/Weblink_entity.aod index 3de5e57011653877b476d970c9aeafd830eb4b1e..ba40c32758c338e9b683a319b8a4e7aa3b00a991 100644 --- a/entity/Weblink_entity/Weblink_entity.aod +++ b/entity/Weblink_entity/Weblink_entity.aod @@ -43,11 +43,12 @@ <entityField> <name>USER_EDIT</name> <title>Editor</title> + <groupable v="false" /> <valueProcess>%aditoprj%/entity/Weblink_entity/entityfields/user_edit/valueProcess.js</valueProcess> </entityField> <entityField> <name>SCORE</name> - <title>Score</title> + <title>${WEBLINK_SCORE}</title> <contentType>NUMBER</contentType> <outputFormat>#' Punkte'</outputFormat> <valueProcess>%aditoprj%/entity/Weblink_entity/entityfields/score/valueProcess.js</valueProcess> @@ -56,6 +57,7 @@ <name>LINKTYPE</name> <title>Link Type</title> <consumer>KeywordLinkType</consumer> + <groupable v="true" /> <mandatory v="true" /> </entityField> <entityField> @@ -253,6 +255,7 @@ <dbRecordFieldMapping> <name>LINKTYPE.displayValue</name> <expression>%aditoprj%/entity/Weblink_entity/recordcontainers/db/recordfieldmappings/linktype.displayvalue/expression.js</expression> + <isFilterable v="true" /> </dbRecordFieldMapping> <dbRecordFieldMapping> <name>PLACEHOLDER.value</name> diff --git a/entity/WorkflowDefinition_entity/entityfields/tableactions/children/createmodel/onActionProcess.js b/entity/WorkflowDefinition_entity/entityfields/tableactions/children/createmodel/onActionProcess.js index 82689600b7a620743de9485b99a43849e497c01b..8efff00703b92e7d2344583ee8403016ef415a74 100644 --- a/entity/WorkflowDefinition_entity/entityfields/tableactions/children/createmodel/onActionProcess.js +++ b/entity/WorkflowDefinition_entity/entityfields/tableactions/children/createmodel/onActionProcess.js @@ -1,3 +1,5 @@ +import("system.neonFilter"); import("system.neon"); -neon.openContext("WorkflowModel", null, null, neon.OPERATINGSTATE_NEW, {}); \ No newline at end of file +var recipe = neonFilter.createEntityRecordsRecipeBuilder().parameters({}).toString(); +neon.openContextWithRecipe("WorkflowModel", null, recipe, neon.OPERATINGSTATE_NEW); diff --git a/entity/WorkflowDefinition_entity/entityfields/tableactions/children/openstore/onActionProcess.js b/entity/WorkflowDefinition_entity/entityfields/tableactions/children/openstore/onActionProcess.js index dec35f2444423141abf1d9fcef1829bc1d4489ae..654b50799e4236655937526f872d26336e455ebf 100644 --- a/entity/WorkflowDefinition_entity/entityfields/tableactions/children/openstore/onActionProcess.js +++ b/entity/WorkflowDefinition_entity/entityfields/tableactions/children/openstore/onActionProcess.js @@ -1,3 +1,5 @@ +import("system.neonFilter"); import("system.neon"); -neon.openContext("WorkflowDefinitionStore", "WorkflowDefinitionStore_view", null, neon.OPERATINGSTATE_VIEW, {}); \ No newline at end of file +var recipe = neonFilter.createEntityRecordsRecipeBuilder().parameters({}).toString(); +neon.openContextWithRecipe("WorkflowDefinitionStore", "WorkflowDefinitionStore_view", recipe, neon.OPERATINGSTATE_VIEW); diff --git a/entity/WorkflowLauncher_entity/entityfields/launchworkflows/onActionProcess.js b/entity/WorkflowLauncher_entity/entityfields/launchworkflows/onActionProcess.js index 71d4a69dc83979fcc497fddddee58f56273c8f59..ec428dfcddbd5ce4c35c11d5e1607111557ecb77 100644 --- a/entity/WorkflowLauncher_entity/entityfields/launchworkflows/onActionProcess.js +++ b/entity/WorkflowLauncher_entity/entityfields/launchworkflows/onActionProcess.js @@ -1,3 +1,4 @@ +import("system.neonFilter"); import("system.neon"); import("Util_lib"); import("Workflow_lib"); @@ -28,5 +29,8 @@ targets.forEach(function ([targetId, targetContext, processVariables]) workflow.setProcessInstanceName(instanceId, instanceName); }); -if (instanceId) - neon.openContext("WorkflowInstance", "WorkflowInstancePreview_view", [instanceId], neon.OPERATINGSTATE_VIEW, {}); \ No newline at end of file +if(instanceId) +{ + var recipe = neonFilter.createEntityRecordsRecipeBuilder().uidsIncludelist([instanceId]).toString(); + neon.openContextWithRecipe("WorkflowInstance", "WorkflowInstancePreview_view", recipe, neon.OPERATINGSTATE_VIEW); +} diff --git a/entity/WorkflowTask_entity/afterSave.js b/entity/WorkflowTask_entity/afterSave.js index 61b54c53434b45f42ffd7184e88c153966cfac5c..1181e2a7626fbdf7aabe02bc999a59f62dd300ca 100644 --- a/entity/WorkflowTask_entity/afterSave.js +++ b/entity/WorkflowTask_entity/afterSave.js @@ -1,3 +1,4 @@ +import("system.neonFilter"); import("system.neon"); import("system.workflow"); import("system.vars"); @@ -26,13 +27,15 @@ if (entityData["FORMRESULT"]) }, startVal); if (newestTask.id !== null) - neon.openContext("WorkflowTask", "WorkflowTaskPreview_view", [newestTask.id], neon.OPERATINGSTATE_VIEW, null); + { + neon.openContextWithRecipe("WorkflowTask", "WorkflowTaskPreview_view", neonFilter.createEntityRecordsRecipeBuilder().uidsIncludelist([newestTask.id]).toString(), neon.OPERATINGSTATE_VIEW); + } else { var params = { "TaskTitle_param": entityData["NAME"] }; //if you try to open the task now, it will display "Task done" - neon.openContext("WorkflowTask", "WorkflowTaskPreview_view", [entityData["UID"]], neon.OPERATINGSTATE_VIEW, params); + neon.openContextWithRecipe("WorkflowTask", "WorkflowTaskPreview_view", neonFilter.createEntityRecordsRecipeBuilder().uidsIncludelist([entityData["UID"]]).parameters(params).toString(), neon.OPERATINGSTATE_VIEW); } } \ No newline at end of file diff --git a/entity/WorkflowTask_entity/entityfields/completetask/onActionProcess.js b/entity/WorkflowTask_entity/entityfields/completetask/onActionProcess.js index 721705872e2e98a99f951d289ef19159f51c76de..bf29dad65c7e0411505c7ca970eec39c0bff255e 100644 --- a/entity/WorkflowTask_entity/entityfields/completetask/onActionProcess.js +++ b/entity/WorkflowTask_entity/entityfields/completetask/onActionProcess.js @@ -1,3 +1,4 @@ +import("system.neonFilter"); import("Employee_lib"); import("system.neon"); import("system.vars"); @@ -9,7 +10,10 @@ var params = { "TaskTitle_param" : vars.get("$field.NAME") }; if (formDefinition) - neon.openContext("WorkflowTask", "WorkflowTaskForm_view", [taskId], neon.OPERATINGSTATE_EDIT, params); +{ + var recipe = neonFilter.createEntityRecordsRecipeBuilder().uidsIncludelist([taskId]).parameters(params).toString(); + neon.openContextWithRecipe("WorkflowTask", "WorkflowTaskForm_view", recipe, neon.OPERATINGSTATE_EDIT); +} else { if (!vars.get("$field.ASSIGNEE")) diff --git a/entity/WorkflowTask_entity/entityfields/tableactions/children/completemultipletasks/onActionProcess.js b/entity/WorkflowTask_entity/entityfields/tableactions/children/completemultipletasks/onActionProcess.js index 8924818c3b007fcd15c84e40198e19a282ec38a9..1ab8c3108802f85e88c5646abe6c480df4999a64 100644 --- a/entity/WorkflowTask_entity/entityfields/tableactions/children/completemultipletasks/onActionProcess.js +++ b/entity/WorkflowTask_entity/entityfields/tableactions/children/completemultipletasks/onActionProcess.js @@ -1,3 +1,4 @@ +import("system.neonFilter"); import("Employee_lib"); import("system.workflow"); import("system.neon"); @@ -34,7 +35,8 @@ tasks.forEach(function (task) if (formTaskId) { - neon.openContext("WorkflowTask", "WorkflowTaskForm_view", [formTaskId], neon.OPERATINGSTATE_EDIT, {}); + var recipe = neonFilter.createEntityRecordsRecipeBuilder().uidsIncludelist([formTaskId]).parameters({}).toString(); + neon.openContextWithRecipe("WorkflowTask", "WorkflowTaskForm_view", recipe, neon.OPERATINGSTATE_EDIT); } else if (refreshRequired) { diff --git a/language/_____LANGUAGE_EXTRA/_____LANGUAGE_EXTRA.aod b/language/_____LANGUAGE_EXTRA/_____LANGUAGE_EXTRA.aod index e0a47e7366cfaf01cb3f61595162eb83a4fffad0..ec41e0f6f84b3666f1aba611dde4f8e7b8f968dc 100644 --- a/language/_____LANGUAGE_EXTRA/_____LANGUAGE_EXTRA.aod +++ b/language/_____LANGUAGE_EXTRA/_____LANGUAGE_EXTRA.aod @@ -11153,6 +11153,51 @@ <entry> <key>Service ticket categories</key> </entry> + <entry> + <key>Mosaico template</key> + </entry> + <entry> + <key>${WEBLINK_SCORE}</key> + </entry> + <entry> + <key>Create only person</key> + </entry> + <entry> + <key>Slave administration '%0' is '%1'</key> + </entry> + <entry> + <key>The file did not contain any data</key> + </entry> + <entry> + <key>Slave administration</key> + </entry> + <entry> + <key>Fields of Dependency</key> + </entry> + <entry> + <key>Deleting the dependency also deletes its fields.</key> + </entry> + <entry> + <key>dd/MM/yyyy HH:mm</key> + </entry> + <entry> + <key>Only .odt, .docx and .docm files are supported for letters.</key> + </entry> + <entry> + <key>Create subordinate relationship</key> + </entry> + <entry> + <key>Datasets are exported</key> + </entry> + <entry> + <key>Affected rows</key> + </entry> + <entry> + <key>MM/dd/yyyy</key> + </entry> + <entry> + <key>dd/MM/yyyy</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 5556566e197109251c634738f8f2d63f70e17d3d..a656485babbed1aae633208a72ddb6011456aace 100644 --- a/language/_____LANGUAGE_de/_____LANGUAGE_de.aod +++ b/language/_____LANGUAGE_de/_____LANGUAGE_de.aod @@ -29,10 +29,18 @@ <key>Create new campaign step</key> <value>Neue Kampagnenstufe erstellen</value> </entry> + <entry> + <key>Create subordinate relationship</key> + <value>Untergeordnete Beziehung anlegen</value> + </entry> <entry> <key>Base Template</key> <value>Ursprungsvorlage</value> </entry> + <entry> + <key>Only .odt, .docx and .docm files are supported for letters.</key> + <value>Für Briefe werden nur .odt, .docx und .docm Dateien unterstützt</value> + </entry> <entry> <key>Open in mosaico</key> <value>In Mosaico öffnen</value> @@ -69,6 +77,18 @@ <key>Ticket was duplicated by</key> <value>Ticket wurde dupliziert. Anwender</value> </entry> + <entry> + <key>Fields of Dependency</key> + <value>Abhängigkeitsfelder</value> + </entry> + <entry> + <key>dd/MM/yyyy HH:mm</key> + <value>dd.MM.yyyy HH:mm</value> + </entry> + <entry> + <key>dd/MM/yyyy</key> + <value>dd.MM.yyyy</value> + </entry> <entry> <key>Do you really want to delete \"%0\"? If tickets still use this inbox, this might cause problems.</key> <value>Postkorb \"%0\" wirklich löschen? Wenn noch Tickets mit diesem Postkorb existieren, kann das zu Problemen führen.</value> @@ -89,6 +109,10 @@ <key>Ticket number of the original ticket</key> <value>Ticketnummer des originalen Tickets</value> </entry> + <entry> + <key>Datasets are exported</key> + <value>Datensätze werden exportiert</value> + </entry> <entry> <key>Ticket duplicated (original)</key> <value>Ticket dupliziert (Original)</value> @@ -149,7 +173,7 @@ <key>Template</key> </entry> <entry> - <key>Use all service ticket categories</key> + <key>Use all serviceticket categories</key> <value>Alle Serviceticket Kategorien verwenden</value> </entry> <entry> @@ -381,9 +405,13 @@ <value>Keine Werbung</value> </entry> <entry> - <key>Contact & Service ticket</key> + <key>Contact & Serviceticket</key> <value>Kontakt & Serviceticket</value> </entry> + <entry> + <key>${WEBLINK_SCORE}</key> + <value>Punkte</value> + </entry> <entry> <key>Interest (subscribed)</key> <value>Interesse (abonniert)</value> @@ -410,7 +438,7 @@ </entry> <entry> <key>Received</key> - <value>Empfangen</value> + <value>Zugestellt</value> </entry> <entry> <key>Change responsible</key> @@ -1121,6 +1149,7 @@ </entry> <entry> <key>Technical email</key> + <value>Technische E-Mail</value> </entry> <entry> <key>Please check if the following fields are filled correctly</key> @@ -1306,6 +1335,10 @@ <key>Copy Campaign</key> <value>Kopiere Kampagne</value> </entry> + <entry> + <key>Affected rows</key> + <value>Betroffene Datensätze</value> + </entry> <entry> <key>Turnover</key> <value>Umsatz</value> @@ -3273,6 +3306,7 @@ </entry> <entry> <key>Copy Recipients</key> + <value>Empfänger kopieren</value> </entry> <entry> <key>dd.MM.yyyy</key> @@ -3953,6 +3987,10 @@ <key>Progress</key> <value>Fortschritt</value> </entry> + <entry> + <key>MM/dd/yyyy</key> + <value>dd.MM.yyyy</value> + </entry> <entry> <key>United States of America</key> <value>Vereinigte Staaten von Amerika</value> @@ -5521,6 +5559,10 @@ <key>Layout costs</key> <value>Gestaltungskosten </value> </entry> + <entry> + <key>Deleting the dependency also deletes its fields.</key> + <value>Wenn Sie die Abhängigkeit löschen, werden auch ihre Felder gelöscht.</value> + </entry> <entry> <key>Serial</key> <value>Serie </value> @@ -6231,6 +6273,7 @@ </entry> <entry> <key>Action mail</key> + <value>Aktions E-Mail</value> </entry> <entry> <key>Consultation</key> @@ -8012,6 +8055,10 @@ <key>processed %0/%1:</key> <value>%0/%1 verarbeitet:</value> </entry> + <entry> + <key>Mosaico template</key> + <value>Mosaicovorlage</value> + </entry> <entry> <key>processing %0/%1</key> <value>verarbeite %0/%1:</value> @@ -8957,7 +9004,7 @@ </entry> <entry> <key>Communication Settings</key> - <value>Werbeeinstellungen</value> + <value>Werbekennzeichen</value> </entry> <entry> <key>SqlBuilder: invalid value-type for pCondition</key> @@ -11395,7 +11442,7 @@ Bitte Datumseingabe prüfen</value> </entry> <entry> <key>Invitation</key> - <value>Inivation</value> + <value>Einladung</value> </entry> <entry> <key>send as mail</key> @@ -12419,7 +12466,7 @@ Bitte Datumseingabe prüfen</value> </entry> <entry> <key>URL</key> - <value></value> + <value>URL</value> </entry> <entry> <key>[TEST] Util_lib</key> @@ -12596,7 +12643,7 @@ Bitte Datumseingabe prüfen</value> </entry> <entry> <key>Remove recipients with advertising ban</key> - <value>Empfänger mit Werbesperre entfernen</value> + <value>Empfänger mit Werbewiderspruch entfernen</value> </entry> <entry> <key>wrong configuration for '%0'</key> @@ -13273,6 +13320,7 @@ Bitte Datumseingabe prüfen</value> </entry> <entry> <key>Remove recipients with communication rejection</key> + <value>Empfänger mit Werbewiderspruch entfernen</value> </entry> <entry> <key>%0 companies were newley assigned. \n%1 companies are no longer assigned (these assignments got the status 'review'). \n%2 valid assignments were unchanged.\nThe Process took %3 seconds.</key> @@ -14189,11 +14237,11 @@ Bitte Datumseingabe prüfen</value> <key>2</key> </entry> <entry> - <key>Service ticket category</key> + <key>Serviceticket category</key> <value>Serviceticket-Kategorie</value> </entry> <entry> - <key>Service ticket categories</key> + <key>Serviceticket categories</key> <value>Serviceticket-Kategorien</value> </entry> <entry> @@ -14467,12 +14515,14 @@ Bitte Datumseingabe prüfen</value> </entry> <entry> <key>Last Click</key> + <value>Letzter Klick</value> </entry> <entry> <key>Opener rate (in %)</key> </entry> <entry> <key>Evaluation type</key> + <value>Auswertungstyp</value> </entry> <entry> <key>remove hashtags from favorite titles</key> diff --git a/language/_____LANGUAGE_en/_____LANGUAGE_en.aod b/language/_____LANGUAGE_en/_____LANGUAGE_en.aod index f06ac690be59f16001a28df96c379a715a72235c..984da88bcae40c383f8edc36d6924e76f015cb81 100644 --- a/language/_____LANGUAGE_en/_____LANGUAGE_en.aod +++ b/language/_____LANGUAGE_en/_____LANGUAGE_en.aod @@ -11249,6 +11249,51 @@ <entry> <key>Status changes skipped!</key> </entry> + <entry> + <key>Mosaico template</key> + </entry> + <entry> + <key>${WEBLINK_SCORE}</key> + </entry> + <entry> + <key>Create only person</key> + </entry> + <entry> + <key>Slave administration '%0' is '%1'</key> + </entry> + <entry> + <key>The file did not contain any data</key> + </entry> + <entry> + <key>Slave administration</key> + </entry> + <entry> + <key>Fields of Dependency</key> + </entry> + <entry> + <key>Deleting the dependency also deletes its fields.</key> + </entry> + <entry> + <key>dd/MM/yyyy HH:mm</key> + </entry> + <entry> + <key>Only .odt, .docx and .docm files are supported for letters.</key> + </entry> + <entry> + <key>Create subordinate relationship</key> + </entry> + <entry> + <key>Datasets are exported</key> + </entry> + <entry> + <key>Affected rows</key> + </entry> + <entry> + <key>MM/dd/yyyy</key> + </entry> + <entry> + <key>dd/MM/yyyy</key> + </entry> </keyValueMap> <font name="Dialog" style="0" size="11" /> </language> diff --git a/neonNotificationType/DownloadReady/onResultOpen.js b/neonNotificationType/DownloadReady/onResultOpen.js index 8f04e8d45b7d950edb92c189d7bdbcbccf0d6b2f..5f6d8ceed4a461c21c4bb3666a62df8281ac2bd0 100644 --- a/neonNotificationType/DownloadReady/onResultOpen.js +++ b/neonNotificationType/DownloadReady/onResultOpen.js @@ -1,3 +1,5 @@ +import("system.neonFilter"); import("system.neon"); -neon.openContext("SerialLetter", null, ["3bb97d70-e651-4800-9742-32b46ac82292"], neon.OPERATINGSTATE_VIEW, {}); \ No newline at end of file +var recipe = neonFilter.createEntityRecordsRecipeBuilder().uidsIncludelist(["3bb97d70-e651-4800-9742-32b46ac82292"]).toString(); +neon.openContextWithRecipe("SerialLetter", null, recipe, neon.OPERATINGSTATE_VIEW); diff --git a/neonView/ActivityAnalyses_view/ActivityAnalyses_view.aod b/neonView/ActivityAnalyses_view/ActivityAnalyses_view.aod index fd67ceed29eb81b3dcee171af5119d624b3ff615..7ca06416fb5b9bd5c248bda1836ac16c26f8c0fa 100644 --- a/neonView/ActivityAnalyses_view/ActivityAnalyses_view.aod +++ b/neonView/ActivityAnalyses_view/ActivityAnalyses_view.aod @@ -34,6 +34,9 @@ <chartType>COLUMN</chartType> <yAxisLabel>Count</yAxisLabel> <entityField>#ENTITY</entityField> + <defaultGroupFields> + <element>CATEGORY</element> + </defaultGroupFields> <columns> <neonDynamicMultiDataChartColumn> <name>5d99020c-0bf4-4815-9a67-9e378fa66b66</name> diff --git a/neonView/AddAttributesToSelectionEdit_view/AddAttributesToSelectionEdit_view.aod b/neonView/AddAttributesToSelectionEdit_view/AddAttributesToSelectionEdit_view.aod index 1ca7472528be1c2d93acf675d8bc581a38ccb70e..c77acc54f8a1222a0784227ce9bc040e0eee7d06 100644 --- a/neonView/AddAttributesToSelectionEdit_view/AddAttributesToSelectionEdit_view.aod +++ b/neonView/AddAttributesToSelectionEdit_view/AddAttributesToSelectionEdit_view.aod @@ -6,25 +6,32 @@ <layout> <headerFooterLayout> <name>layout</name> - <footer>Generic</footer> + <header>scoreCardViewTemplate</header> </headerFooterLayout> </layout> <children> - <neonViewReference> - <name>3f715b52-ef4b-4b62-916c-0a23833bc2da</name> - <entityField>AddAttributeToSelectionMultiEdit</entityField> - <view>AddAttributesToSelectionMultiEdit_view</view> - </neonViewReference> - <genericViewTemplate> - <name>Generic</name> - <hideLabels v="true" /> - <isEditable v="false" /> + <scoreCardViewTemplate> + <name>scoreCardViewTemplate</name> <fields> <entityFieldLink> - <name>93ffcf34-83ee-4200-a711-1be6aef880b6</name> + <name>24e89b7b-7f57-47fd-a437-9e882b71b8a7</name> <entityField>affectedData</entityField> </entityFieldLink> </fields> + </scoreCardViewTemplate> + <genericViewTemplate> + <name>tst</name> + <fields> + <entityFieldLink> + <name>6938d0f4-c4a6-4caf-9fd0-eb082f01d9af</name> + <entityField>UID</entityField> + </entityFieldLink> + </fields> </genericViewTemplate> + <neonViewReference> + <name>3f715b52-ef4b-4b62-916c-0a23833bc2da</name> + <entityField>AddAttributeToSelectionMultiEdit</entityField> + <view>AddAttributesToSelectionMultiEdit_view</view> + </neonViewReference> </children> </neonView> diff --git a/neonView/AdvertisingFilter_view/AdvertisingFilter_view.aod b/neonView/AdvertisingFilter_view/AdvertisingFilter_view.aod index 842cca711c454cab53db8971345bc76d9d167929..0142ccd3be22efb6cb4a66bcc84fccb829a30d4b 100644 --- a/neonView/AdvertisingFilter_view/AdvertisingFilter_view.aod +++ b/neonView/AdvertisingFilter_view/AdvertisingFilter_view.aod @@ -16,7 +16,7 @@ <columns> <neonTableColumn> <name>8c3e1048-7f7a-4210-a849-198f5b569c04</name> - <entityField>#ICON</entityField> + <entityField>PICTURE</entityField> </neonTableColumn> <neonTableColumn> <name>b8971987-29bb-48dc-b9fc-075a63ef0b4e</name> diff --git a/neonView/AdvertisingPreview_view/AdvertisingPreview_view.aod b/neonView/AdvertisingPreview_view/AdvertisingPreview_view.aod index d8d0a57add798641769920735cd6ad86319bcdae..7f185600c6333265e179b3b7f74e1a2e7ab47186 100644 --- a/neonView/AdvertisingPreview_view/AdvertisingPreview_view.aod +++ b/neonView/AdvertisingPreview_view/AdvertisingPreview_view.aod @@ -11,7 +11,7 @@ <children> <cardViewTemplate> <name>Card</name> - <iconField>#ICON</iconField> + <iconField>PICTURE</iconField> <titleField>STATUS</titleField> <subtitleField>CONTACT_ID</subtitleField> <descriptionField>RESPONSIBLE_ID</descriptionField> diff --git a/neonView/CommunicationSettingsFilter_view/CommunicationSettingsFilter_view.aod b/neonView/CommunicationSettingsFilter_view/CommunicationSettingsFilter_view.aod index 7c2518ba09535bc4d3593484be3f90fdb9751e5d..9ed01d96a4d682136298f7798e245690a1529eb2 100644 --- a/neonView/CommunicationSettingsFilter_view/CommunicationSettingsFilter_view.aod +++ b/neonView/CommunicationSettingsFilter_view/CommunicationSettingsFilter_view.aod @@ -14,7 +14,7 @@ <columns> <neonTreeTableColumn> <name>1e698c64-ce5c-46d1-8c90-290d5ea187c7</name> - <entityField>ICON</entityField> + <entityField>PICTURE</entityField> </neonTreeTableColumn> <neonTreeTableColumn> <name>5738f47a-57cd-4e6a-a017-1a5ab80581ac</name> diff --git a/neonView/CommunicationSettingsPreview_view/CommunicationSettingsPreview_view.aod b/neonView/CommunicationSettingsPreview_view/CommunicationSettingsPreview_view.aod index 80f84884292be22e8b9ac4ff85599d312047f574..41516c7acea918be460af64b4dcedd482a03783a 100644 --- a/neonView/CommunicationSettingsPreview_view/CommunicationSettingsPreview_view.aod +++ b/neonView/CommunicationSettingsPreview_view/CommunicationSettingsPreview_view.aod @@ -11,7 +11,7 @@ <children> <cardViewTemplate> <name>Card</name> - <iconField>ICON</iconField> + <iconField>PICTURE</iconField> <titleField>#CONTENTTITLE</titleField> <subtitleField>STATUS</subtitleField> <isEditable v="false" /> diff --git a/neonView/ContactList_view/ContactList_view.aod b/neonView/ContactList_view/ContactList_view.aod index f5f7695c21862e7833187b2a07d610df45f6ba25..0b8de21bdc91e041ebf81eb3991577b8f51ebbde 100644 --- a/neonView/ContactList_view/ContactList_view.aod +++ b/neonView/ContactList_view/ContactList_view.aod @@ -15,6 +15,10 @@ <isDeletable v="false" /> <isEditable v="false" /> <columns> + <neonTableColumn> + <name>5c3b4a01-f8d6-45df-92aa-8e39c94789f5</name> + <entityField>PICTURE</entityField> + </neonTableColumn> <neonTableColumn> <name>ef71b5ad-8581-4845-ae66-7df17d1459e0</name> <entityField>ORGANISATION_CONTACTID</entityField> diff --git a/neonView/DescriptionTranslationFilter_view/DescriptionTranslationFilter_view.aod b/neonView/DescriptionTranslationFilter_view/DescriptionTranslationFilter_view.aod index ba3690b8e6b8686a462b06874aa21fe8cc45af8b..3dc9a54ea8cb6b6ad6562cea7bcedfca61ee1ad4 100644 --- a/neonView/DescriptionTranslationFilter_view/DescriptionTranslationFilter_view.aod +++ b/neonView/DescriptionTranslationFilter_view/DescriptionTranslationFilter_view.aod @@ -12,6 +12,10 @@ <name>translation</name> <entityField>#ENTITY</entityField> <columns> + <neonTableColumn> + <name>b33e3ff8-ec3a-4d5d-8961-3b18175502a3</name> + <entityField>PICTURE</entityField> + </neonTableColumn> <neonTableColumn> <name>4bdaf352-d5f1-44a1-9cca-7cb877928ba5</name> <entityField>LANG</entityField> @@ -26,6 +30,10 @@ <name>Treetable</name> <entityField>#ENTITY</entityField> <columns> + <neonTreeTableColumn> + <name>5303f922-1e77-48db-94b3-f803e10f91c3</name> + <entityField>PICTURE</entityField> + </neonTreeTableColumn> <neonTreeTableColumn> <name>a9046b9c-0324-4e19-a22b-ae39c6a1c8c4</name> <entityField>LANG</entityField> diff --git a/neonView/DescriptionTranslationPreview_view/DescriptionTranslationPreview_view.aod b/neonView/DescriptionTranslationPreview_view/DescriptionTranslationPreview_view.aod index 6d15eecc7d679b7f43132781c249f00c6ea08a9e..907c3d70c50a89e4dcad043ab99aa7ea747df51a 100644 --- a/neonView/DescriptionTranslationPreview_view/DescriptionTranslationPreview_view.aod +++ b/neonView/DescriptionTranslationPreview_view/DescriptionTranslationPreview_view.aod @@ -10,19 +10,11 @@ </boxLayout> </layout> <children> - <genericViewTemplate> - <name>TranslationInfo</name> - <showDrawer v="true" /> - <drawerCaption>Description</drawerCaption> - <hideLabels v="true" /> - <entityField>#ENTITY</entityField> - <fields> - <entityFieldLink> - <name>5e432839-ca9a-4a29-8006-0a1673d94c92</name> - <entityField>LANG</entityField> - </entityFieldLink> - </fields> - </genericViewTemplate> + <cardViewTemplate> + <name>Card</name> + <iconField>PICTURE</iconField> + <titleField>LANG</titleField> + </cardViewTemplate> <genericViewTemplate> <name>Description</name> <showDrawer v="true" /> diff --git a/neonView/ExportTemplateFieldEdit_view/ExportTemplateFieldEdit_view.aod b/neonView/ExportTemplateFieldEdit_view/ExportTemplateFieldEdit_view.aod index 51a62980047cd59cd591cad2e430988b364df757..1b97df09b127578aa21188b676ef0f48e84c7d4e 100644 --- a/neonView/ExportTemplateFieldEdit_view/ExportTemplateFieldEdit_view.aod +++ b/neonView/ExportTemplateFieldEdit_view/ExportTemplateFieldEdit_view.aod @@ -2,6 +2,7 @@ <neonView xmlns="http://www.adito.de/2018/ao/Model" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" VERSION="1.1.8" xsi:schemaLocation="http://www.adito.de/2018/ao/Model adito://models/xsd/neonView/1.1.8"> <name>ExportTemplateFieldEdit_view</name> <majorModelMode>DISTRIBUTED</majorModelMode> + <size>SMALL</size> <layout> <noneLayout> <name>layout</name> diff --git a/neonView/ExportTemplateFilter_view/ExportTemplateFilter_view.aod b/neonView/ExportTemplateFilter_view/ExportTemplateFilter_view.aod index a33b96878aa90a70f95fb5a6146d2dcb6df3e6cf..f0fb6c470db3070c7150b7c905d158861730e7a6 100644 --- a/neonView/ExportTemplateFilter_view/ExportTemplateFilter_view.aod +++ b/neonView/ExportTemplateFilter_view/ExportTemplateFilter_view.aod @@ -14,6 +14,10 @@ <entityField>#ENTITY</entityField> <isEditable v="true" /> <columns> + <neonTableColumn> + <name>73ed371b-1727-49aa-ad4d-59ba0571df49</name> + <entityField>PICTURE</entityField> + </neonTableColumn> <neonTableColumn> <name>76bc9ab0-8294-4df1-bdcb-6a86daef2170</name> <entityField>TITLE</entityField> @@ -40,6 +44,10 @@ <name>Treetable</name> <entityField>#ENTITY</entityField> <columns> + <neonTreeTableColumn> + <name>65eb954d-73fd-4beb-a682-a1b432c55ac7</name> + <entityField>PICTURE</entityField> + </neonTreeTableColumn> <neonTreeTableColumn> <name>bf2f11c2-8cf0-40da-9692-d09bf8391679</name> <entityField>TITLE</entityField> diff --git a/neonView/ExportTemplateLookup_view/ExportTemplateLookup_view.aod b/neonView/ExportTemplateLookup_view/ExportTemplateLookup_view.aod index a1f2c8f4f1accd5137cb8c02a04df2b35f25a179..14457fb8a41b2570a5e1a6a08b58b655a6d1b5de 100644 --- a/neonView/ExportTemplateLookup_view/ExportTemplateLookup_view.aod +++ b/neonView/ExportTemplateLookup_view/ExportTemplateLookup_view.aod @@ -14,6 +14,10 @@ <entityField>#ENTITY</entityField> <isEditable v="true" /> <columns> + <neonTableColumn> + <name>b2054c7a-4814-407b-950e-29a053180fb5</name> + <entityField>PICTURE</entityField> + </neonTableColumn> <neonTableColumn> <name>76bc9ab0-8294-4df1-bdcb-6a86daef2170</name> <entityField>TITLE</entityField> diff --git a/neonView/ExportTemplatePreview_view/ExportTemplatePreview_view.aod b/neonView/ExportTemplatePreview_view/ExportTemplatePreview_view.aod index 04c2068b8cf4a454e73479479090dbf319318cfb..06604679c1eb8120212f5123fbd07555b7dd8ce5 100644 --- a/neonView/ExportTemplatePreview_view/ExportTemplatePreview_view.aod +++ b/neonView/ExportTemplatePreview_view/ExportTemplatePreview_view.aod @@ -11,6 +11,7 @@ <children> <cardViewTemplate> <name>card</name> + <iconField>PICTURE</iconField> <titleField>TITLE</titleField> <entityField>#ENTITY</entityField> </cardViewTemplate> diff --git a/neonView/ForecastFilter_view/ForecastFilter_view.aod b/neonView/ForecastFilter_view/ForecastFilter_view.aod index 2003610345324c73fcf071ee54400368b0445569..f232cf1d4c9d4af943003da4a22777f432b8d907 100644 --- a/neonView/ForecastFilter_view/ForecastFilter_view.aod +++ b/neonView/ForecastFilter_view/ForecastFilter_view.aod @@ -18,6 +18,10 @@ <element>INFO</element> </editableColumns> <columns> + <neonTableColumn> + <name>68de81f0-00c6-4e11-a8d3-2922a202a1b0</name> + <entityField>PICTURE</entityField> + </neonTableColumn> <neonTableColumn> <name>ed63515d-4c7b-4e40-92b0-81fa1395b0f1</name> <entityField>GROUPCODE</entityField> @@ -50,6 +54,10 @@ <subtitleField>VOLUME</subtitleField> <entityField>#ENTITY</entityField> <columns> + <neonTableColumn> + <name>b7acab7d-5e92-45b5-9b41-e653ee1e5679</name> + <entityField>PICTURE</entityField> + </neonTableColumn> <neonTableColumn> <name>323f26d7-4ac2-4ff9-91d1-7459cc7e3469</name> <entityField>GROUPCODE</entityField> @@ -72,6 +80,10 @@ <name>Treetable</name> <entityField>#ENTITY</entityField> <columns> + <neonTreeTableColumn> + <name>a6a83c1c-6ea0-4f06-bf8a-8d6b071b1a64</name> + <entityField>PICTURE</entityField> + </neonTreeTableColumn> <neonTreeTableColumn> <name>9bdb1cf9-5348-464d-84fb-747d509b0eef</name> <entityField>GROUPCODE</entityField> diff --git a/neonView/ForecastPreview_view/ForecastPreview_view.aod b/neonView/ForecastPreview_view/ForecastPreview_view.aod index c35834022761561c18ba617f2b659fb5e79c9422..83d8efb894d56b0630967da3e9e942fd66e765f5 100644 --- a/neonView/ForecastPreview_view/ForecastPreview_view.aod +++ b/neonView/ForecastPreview_view/ForecastPreview_view.aod @@ -11,6 +11,7 @@ <children> <cardViewTemplate> <name>Header</name> + <iconField>PICTURE</iconField> <titleField>GROUPCODE</titleField> <descriptionField>DATE_START</descriptionField> <entityField>#ENTITY</entityField> diff --git a/neonView/InterestLinkFilter_view/InterestLinkFilter_view.aod b/neonView/InterestLinkFilter_view/InterestLinkFilter_view.aod index 162387862cf00ad881b94050fbe3b34dd41e313d..7b5f66f6dd806760f74d29d8ee5e78fde73007ea 100644 --- a/neonView/InterestLinkFilter_view/InterestLinkFilter_view.aod +++ b/neonView/InterestLinkFilter_view/InterestLinkFilter_view.aod @@ -12,6 +12,10 @@ <tableViewTemplate> <name>Table</name> <columns> + <neonTableColumn> + <name>435b5eb5-3854-4906-bd93-dbfed0bbe01c</name> + <entityField>PICTURE</entityField> + </neonTableColumn> <neonTableColumn> <name>261f0387-dd00-486d-add4-56d0c64be583</name> <entityField>INTEREST_ID</entityField> diff --git a/neonView/OfferitemFilter_view/OfferitemFilter_view.aod b/neonView/OfferitemFilter_view/OfferitemFilter_view.aod index ce595dd9657cac28869bab3578789379dc34bb2e..f7aa53c60c7c5b47cd7b3779f714e714f5074b3f 100644 --- a/neonView/OfferitemFilter_view/OfferitemFilter_view.aod +++ b/neonView/OfferitemFilter_view/OfferitemFilter_view.aod @@ -18,6 +18,10 @@ </editableColumns> <favoriteActionGroup1>group</favoriteActionGroup1> <columns> + <neonTableColumn> + <name>10cd8712-bb90-4c03-ac07-10d318c1e6e9</name> + <entityField>PICTURE</entityField> + </neonTableColumn> <neonTreeTableColumn> <name>91e85f61-5e5d-48f8-aeb1-a5740ec07e25</name> <entityField>ITEMPOSITION</entityField> @@ -82,6 +86,10 @@ <entityField>#ENTITY</entityField> <favoriteActionGroup1>group</favoriteActionGroup1> <columns> + <neonTreeTableColumn> + <name>6f0c91ac-1e3a-4d42-a063-b7daf1805a1e</name> + <entityField>PICTURE</entityField> + </neonTreeTableColumn> <neonTreeTableColumn> <name>91e85f61-5e5d-48f8-aeb1-a5740ec07e25</name> <entityField>ITEMPOSITION</entityField> diff --git a/neonView/OfferitemPreview_view/OfferitemPreview_view.aod b/neonView/OfferitemPreview_view/OfferitemPreview_view.aod index 9f7d0ff44999ccea8629701d9bca1874b4b75bb6..719a8984f8a1b29cdfb625affdf8e50667ec80c7 100644 --- a/neonView/OfferitemPreview_view/OfferitemPreview_view.aod +++ b/neonView/OfferitemPreview_view/OfferitemPreview_view.aod @@ -8,6 +8,12 @@ </boxLayout> </layout> <children> + <cardViewTemplate> + <name>Card</name> + <iconField>PICTURE</iconField> + <titleField>PRODUCT_ID</titleField> + <subtitleField>ITEMPOSITION</subtitleField> + </cardViewTemplate> <genericViewTemplate> <name>Info</name> <showDrawer v="true" /> @@ -15,15 +21,7 @@ <entityField>#ENTITY</entityField> <fields> <entityFieldLink> - <name>171901d8-32a2-4689-aeb3-e00936172330</name> - <entityField>ITEMPOSITION</entityField> - </entityFieldLink> - <entityFieldLink> - <name>335b6954-46ab-4235-9681-3ebd261af72a</name> - <entityField>PRODUCT_ID</entityField> - </entityFieldLink> - <entityFieldLink> - <name>e792d720-187f-4aa1-917c-1c8065222b72</name> + <name>f0a31e9a-4e20-474b-85a4-07dd46062486</name> <entityField>QUANTITY</entityField> </entityFieldLink> <entityFieldLink> @@ -42,6 +40,10 @@ <name>b161516e-f1ee-47c6-ae92-a37bbe0ae564</name> <entityField>TotalPrice</entityField> </entityFieldLink> + <entityFieldLink> + <name>69948799-9ec2-4fba-843d-7b86f9e4585f</name> + <entityField>TotalPrice</entityField> + </entityFieldLink> <entityFieldLink> <name>f8043352-f756-4854-9caa-a9aea073e4fe</name> <entityField>DISCOUNT</entityField> @@ -50,10 +52,6 @@ <name>e25386dc-a740-4f93-a1f0-32317cf5a36a</name> <entityField>OPTIONAL</entityField> </entityFieldLink> - <entityFieldLink> - <name>69948799-9ec2-4fba-843d-7b86f9e4585f</name> - <entityField>TotalPrice</entityField> - </entityFieldLink> </fields> </genericViewTemplate> <genericViewTemplate> diff --git a/neonView/OrderitemFilter_view/OrderitemFilter_view.aod b/neonView/OrderitemFilter_view/OrderitemFilter_view.aod index 5696e2e72d229266950afcc651c31daef7abcb0a..289133336b731e7e6cbd596cfefd5516854d8e72 100644 --- a/neonView/OrderitemFilter_view/OrderitemFilter_view.aod +++ b/neonView/OrderitemFilter_view/OrderitemFilter_view.aod @@ -16,6 +16,10 @@ <entityField>#ENTITY</entityField> <favoriteActionGroup1>group</favoriteActionGroup1> <columns> + <neonTableColumn> + <name>e34ac276-72e4-4699-a564-830a3dd1aa46</name> + <entityField>PICTURE</entityField> + </neonTableColumn> <neonTableColumn> <name>8c74810d-d127-4e64-8fbf-1b3db1835232</name> <entityField>ITEMPOSITION</entityField> @@ -59,6 +63,10 @@ <entityField>#ENTITY</entityField> <favoriteActionGroup1>group</favoriteActionGroup1> <columns> + <neonTreeTableColumn> + <name>63a667e9-3729-4ceb-98db-bb4d39bf6420</name> + <entityField>PICTURE</entityField> + </neonTreeTableColumn> <neonTreeTableColumn> <name>d07130dd-7727-45cc-8f8c-ae5d2972d21d</name> <entityField>ITEMPOSITION</entityField> @@ -107,6 +115,10 @@ <element>INFO</element> </editableColumns> <columns> + <neonTableColumn> + <name>85d30b0c-1e03-4b46-a4d1-caa3e2e7e589</name> + <entityField>PICTURE</entityField> + </neonTableColumn> <neonTableColumn> <name>5bc12f25-59d4-49b5-bbb8-4ff791303cb7</name> <entityField>ITEMPOSITION</entityField> diff --git a/neonView/OrderitemPreview_view/OrderitemPreview_view.aod b/neonView/OrderitemPreview_view/OrderitemPreview_view.aod index ccbae0155b998c96d98076d0597ea1652664d847..554b0bdc40fe12c71dd449d9cff5a50be14923d5 100644 --- a/neonView/OrderitemPreview_view/OrderitemPreview_view.aod +++ b/neonView/OrderitemPreview_view/OrderitemPreview_view.aod @@ -8,20 +8,18 @@ </headerFooterLayout> </layout> <children> + <cardViewTemplate> + <name>Card</name> + <iconField>PICTURE</iconField> + <titleField>PRODUCT_ID</titleField> + <subtitleField>ITEMPOSITION</subtitleField> + </cardViewTemplate> <genericViewTemplate> <name>Info</name> <showDrawer v="true" /> <drawerCaption>Details</drawerCaption> <entityField>#ENTITY</entityField> <fields> - <entityFieldLink> - <name>ad4fb267-277c-47ca-ad3d-c518cd234a39</name> - <entityField>ITEMPOSITION</entityField> - </entityFieldLink> - <entityFieldLink> - <name>a704c785-f27f-431b-a6ac-77fd21217d9d</name> - <entityField>PRODUCT_ID</entityField> - </entityFieldLink> <entityFieldLink> <name>d501d9d5-f149-4685-903d-0394dc6e40e2</name> <entityField>QUANTITY</entityField> diff --git a/neonView/PersonPreview_view/PersonPreview_view.aod b/neonView/PersonPreview_view/PersonPreview_view.aod index e8a142bf602d2e1a0c1e2702581ef02b5c119a95..4295cd2a757d92a170c9369933ebe3d2f5338d46 100644 --- a/neonView/PersonPreview_view/PersonPreview_view.aod +++ b/neonView/PersonPreview_view/PersonPreview_view.aod @@ -87,6 +87,10 @@ <name>d5cc98c9-9483-4c2d-b0f3-69e25a0474f3</name> <entityField>POSITION</entityField> </entityFieldLink> + <entityFieldLink> + <name>970d14cf-fa21-45b0-b4dc-62ba57cab2c6</name> + <entityField>LETTERSALUTATION</entityField> + </entityFieldLink> </fields> </genericViewTemplate> <scoreCardViewTemplate> diff --git a/neonView/PlanningFilter_view/PlanningFilter_view.aod b/neonView/PlanningFilter_view/PlanningFilter_view.aod index 93e3ba9a59aed53b4e78fa48b2fecd3ff94338e4..8e3102318ed4508d3d7f2dd95b337431f1468256 100644 --- a/neonView/PlanningFilter_view/PlanningFilter_view.aod +++ b/neonView/PlanningFilter_view/PlanningFilter_view.aod @@ -13,6 +13,10 @@ <name>Table</name> <favoriteActionGroup1>FilterViewActions</favoriteActionGroup1> <columns> + <neonTableColumn> + <name>b0c6fa20-9647-4a78-a6bf-006da824826d</name> + <entityField>PICTURE</entityField> + </neonTableColumn> <neonTableColumn> <name>2024c784-29c3-498b-80b3-f2e378f25773</name> <entityField>CONTACT_ID</entityField> @@ -47,6 +51,10 @@ <name>TreeTable</name> <favoriteActionGroup1>FilterViewActions</favoriteActionGroup1> <columns> + <neonTreeTableColumn> + <name>1e6b027f-2c23-42e7-995f-aa291b9ecb7d</name> + <entityField>PICTURE</entityField> + </neonTreeTableColumn> <neonTreeTableColumn> <name>9664cd27-0bd3-48e1-bc4e-b80e8ce52c64</name> <entityField>CONTACT_ID</entityField> @@ -84,6 +92,10 @@ </editableColumns> <favoriteActionGroup1>FilterViewActions</favoriteActionGroup1> <columns> + <neonTableColumn> + <name>40c6e73b-bf74-4ebe-bdb3-a81431fb3179</name> + <entityField>PICTURE</entityField> + </neonTableColumn> <neonTableColumn> <name>9dc22f85-20d3-4891-810e-74570c1faf80</name> <entityField>FORECAST_YEAR</entityField> diff --git a/neonView/PlanningMultiEditOverlay_view/PlanningMultiEditOverlay_view.aod b/neonView/PlanningMultiEditOverlay_view/PlanningMultiEditOverlay_view.aod index e190fa525c288644ad81925452f92cdf6353e12e..4636aeff1db651a65862556e9853ba2d591e824c 100644 --- a/neonView/PlanningMultiEditOverlay_view/PlanningMultiEditOverlay_view.aod +++ b/neonView/PlanningMultiEditOverlay_view/PlanningMultiEditOverlay_view.aod @@ -19,6 +19,10 @@ <isDeletable v="false" /> <isEditable v="false" /> <columns> + <neonTableColumn> + <name>dd5202ce-c167-46d2-a606-bafc64ca1d46</name> + <entityField>PICTURE</entityField> + </neonTableColumn> <neonTableColumn> <name>bb541f09-5a3c-4905-a73e-4a94b8dd4aba</name> <entityField>CONTACT_ID</entityField> diff --git a/neonView/PlanningOrganisationFilter_view/PlanningOrganisationFilter_view.aod b/neonView/PlanningOrganisationFilter_view/PlanningOrganisationFilter_view.aod index ed4339a63e0f6aea64875454565d42f8c3f56cfb..86ec2ce27a2423d0772fe8b6d2b70ecb81567831 100644 --- a/neonView/PlanningOrganisationFilter_view/PlanningOrganisationFilter_view.aod +++ b/neonView/PlanningOrganisationFilter_view/PlanningOrganisationFilter_view.aod @@ -16,6 +16,10 @@ </editableColumns> <favoriteActionGroup1>FilterViewActions</favoriteActionGroup1> <columns> + <neonTableColumn> + <name>6c6cdc5d-1c78-4445-ae4f-361cd40563a0</name> + <entityField>PICTURE</entityField> + </neonTableColumn> <neonTableColumn> <name>9dc22f85-20d3-4891-810e-74570c1faf80</name> <entityField>FORECAST_YEAR</entityField> @@ -64,6 +68,10 @@ <name>Table</name> <favoriteActionGroup1>FilterViewActions</favoriteActionGroup1> <columns> + <neonTableColumn> + <name>58ecb5ec-ea5f-4a35-b76b-f6b855b2762e</name> + <entityField>PICTURE</entityField> + </neonTableColumn> <neonTableColumn> <name>2024c784-29c3-498b-80b3-f2e378f25773</name> <entityField>CONTACT_ID</entityField> @@ -98,6 +106,10 @@ <name>TreeTable</name> <favoriteActionGroup1>FilterViewActions</favoriteActionGroup1> <columns> + <neonTreeTableColumn> + <name>33dab0a4-01f6-48b9-b1e0-6bd5b089d2d7</name> + <entityField>PICTURE</entityField> + </neonTreeTableColumn> <neonTreeTableColumn> <name>9664cd27-0bd3-48e1-bc4e-b80e8ce52c64</name> <entityField>CONTACT_ID</entityField> diff --git a/neonView/Prod2prodFilter_view/Prod2prodFilter_view.aod b/neonView/Prod2prodFilter_view/Prod2prodFilter_view.aod index c009ab9b93b68c970edc4ed546fa70443de9a91b..ef67b19dbe7e56baba2c48a2fda5493ec7b03832 100644 --- a/neonView/Prod2prodFilter_view/Prod2prodFilter_view.aod +++ b/neonView/Prod2prodFilter_view/Prod2prodFilter_view.aod @@ -20,6 +20,10 @@ </devices> <title>Parts list</title> <columns> + <neonTreeTableColumn> + <name>20ab6e11-ed41-4e54-973a-fa3be1be0764</name> + <entityField>PICTURE</entityField> + </neonTreeTableColumn> <neonTreeTableColumn> <name>43d3c9b0-21ab-4996-8d24-af74a5ee1e1a</name> <entityField>PRODUCTCODE</entityField> @@ -63,6 +67,10 @@ <element>TAKEPRICE</element> </editableColumns> <columns> + <neonTableColumn> + <name>6804d8c8-4eea-4d10-acf3-beb7e3e69244</name> + <entityField>PICTURE</entityField> + </neonTableColumn> <neonTableColumn> <name>82c22185-4532-4084-a7d2-0f64270e50b4</name> <entityField>PRODUCTCODE</entityField> diff --git a/neonView/TimetrackingFilter_view/TimetrackingFilter_view.aod b/neonView/TimetrackingFilter_view/TimetrackingFilter_view.aod index 4a8121fb008d4e37a98e6ed4bda8b76cab0fe4dd..cb734d95b7b334126d9312495aed96a8ff142cfd 100644 --- a/neonView/TimetrackingFilter_view/TimetrackingFilter_view.aod +++ b/neonView/TimetrackingFilter_view/TimetrackingFilter_view.aod @@ -18,6 +18,10 @@ <descriptionField>TRACKINGDATE</descriptionField> <entityField>#ENTITY</entityField> <columns> + <neonTableColumn> + <name>162997d8-5ea1-4ee2-9fb1-add45d2a0d52</name> + <entityField>PICTURE</entityField> + </neonTableColumn> <neonTableColumn> <name>fa423332-8987-4fc2-981c-66447678b922</name> <entityField>TRACKINGDATE</entityField> @@ -40,6 +44,10 @@ <name>Treetable</name> <entityField>#ENTITY</entityField> <columns> + <neonTreeTableColumn> + <name>d20a13e9-97e1-461e-8aab-8dec1a23a647</name> + <entityField>PICTURE</entityField> + </neonTreeTableColumn> <neonTreeTableColumn> <name>314436db-0a9e-4113-ab70-7922a7a03ab5</name> <entityField>TRACKINGDATE</entityField> diff --git a/neonView/TimetrackingPreview_view/TimetrackingPreview_view.aod b/neonView/TimetrackingPreview_view/TimetrackingPreview_view.aod index 59b86472d8ec3e83e6776e830bd9f79963d02b2b..8072e61cb54a9b8d1928a0e6dab2f0c236da2df4 100644 --- a/neonView/TimetrackingPreview_view/TimetrackingPreview_view.aod +++ b/neonView/TimetrackingPreview_view/TimetrackingPreview_view.aod @@ -8,26 +8,13 @@ </headerFooterLayout> </layout> <children> - <genericViewTemplate> - <name>Details</name> - <showDrawer v="true" /> - <drawerCaption>Details</drawerCaption> - <entityField>#ENTITY</entityField> - <fields> - <entityFieldLink> - <name>835197c0-2e0c-4989-8d5b-80ccd064d55e</name> - <entityField>CONTACT_ID</entityField> - </entityFieldLink> - <entityFieldLink> - <name>ce7d8cc0-ac9c-4195-861f-23483db6cd91</name> - <entityField>TRACKINGDATE</entityField> - </entityFieldLink> - <entityFieldLink> - <name>45f4f97c-5fde-4c90-9dba-4e5b540328b3</name> - <entityField>TRACKINGMINUTES</entityField> - </entityFieldLink> - </fields> - </genericViewTemplate> + <cardViewTemplate> + <name>Card</name> + <iconField>PICTURE</iconField> + <titleField>CONTACT_ID</titleField> + <subtitleField>TRACKINGDATE</subtitleField> + <informationField>TRACKINGMINUTES</informationField> + </cardViewTemplate> <genericViewTemplate> <name>Info</name> <showDrawer v="true" /> diff --git a/neonView/WeblinkEdit_view/WeblinkEdit_view.aod b/neonView/WeblinkEdit_view/WeblinkEdit_view.aod index 0591c32d56b9831c6f8e5d43309b14349c0fe85d..a2f73f6bb97de365dee4b811a9fd839901786d4a 100644 --- a/neonView/WeblinkEdit_view/WeblinkEdit_view.aod +++ b/neonView/WeblinkEdit_view/WeblinkEdit_view.aod @@ -23,10 +23,6 @@ <name>70c52c3f-7e0b-4069-b56f-e0769f911efa</name> <entityField>LINKTYPE</entityField> </entityFieldLink> - <entityFieldLink> - <name>836aafd9-a8c3-4a7c-9b2c-260ec8bbee45</name> - <entityField>SCORE</entityField> - </entityFieldLink> <entityFieldLink> <name>4313c2fb-3551-4c66-81c9-ad950c44a105</name> <entityField>PLACEHOLDER</entityField> @@ -35,6 +31,10 @@ <name>2b22fb4a-5e7e-48ee-b6d1-3ee4381fb419</name> <entityField>ISREDIRECT</entityField> </entityFieldLink> + <entityFieldLink> + <name>57d8f3b6-2c98-404f-97a6-efcb89828346</name> + <entityField>LINKEVALUATIONTYPE</entityField> + </entityFieldLink> <entityFieldLink> <name>65495a4d-dccf-42ba-bba4-af15b9ad06aa</name> <entityField>ACTION_TYPE</entityField> @@ -48,8 +48,8 @@ <entityField>WORKFLOWSIGNAL_NAME</entityField> </entityFieldLink> <entityFieldLink> - <name>57d8f3b6-2c98-404f-97a6-efcb89828346</name> - <entityField>LINKEVALUATIONTYPE</entityField> + <name>836aafd9-a8c3-4a7c-9b2c-260ec8bbee45</name> + <entityField>SCORE</entityField> </entityFieldLink> </fields> </genericViewTemplate> diff --git a/neonView/WeblinkFilter_view/WeblinkFilter_view.aod b/neonView/WeblinkFilter_view/WeblinkFilter_view.aod index a0f9d529a163e1d3cf8c7fc35f59045013c5741e..890ef30e247b5eb5cfe14917dea8aa62885d042d 100644 --- a/neonView/WeblinkFilter_view/WeblinkFilter_view.aod +++ b/neonView/WeblinkFilter_view/WeblinkFilter_view.aod @@ -4,9 +4,9 @@ <majorModelMode>DISTRIBUTED</majorModelMode> <filterable v="true" /> <layout> - <noneLayout> + <groupLayout> <name>layout</name> - </noneLayout> + </groupLayout> </layout> <children> <tableViewTemplate> @@ -48,5 +48,43 @@ </neonTableColumn> </columns> </tableViewTemplate> + <treeTableViewTemplate> + <name>TreeTable</name> + <hideContentSearch v="false" /> + <columns> + <neonTreeTableColumn> + <name>8ca57c18-72f9-4c92-9aa8-d3b793c00252</name> + <entityField>#IMAGE</entityField> + </neonTreeTableColumn> + <neonTreeTableColumn> + <name>c3f84cc8-1caf-41c6-9186-259618b4bc76</name> + <entityField>URL</entityField> + </neonTreeTableColumn> + <neonTreeTableColumn> + <name>152da936-3780-4a56-ae17-cad5d3dd2241</name> + <entityField>LINKTYPE</entityField> + </neonTreeTableColumn> + <neonTreeTableColumn> + <name>c5da4c2c-4e04-48a0-a4ee-3b722afde544</name> + <entityField>SCORE</entityField> + </neonTreeTableColumn> + <neonTreeTableColumn> + <name>c09b0dae-5b83-4ebb-99d5-b9c035f428b2</name> + <entityField>Tags</entityField> + </neonTreeTableColumn> + <neonTreeTableColumn> + <name>928f3501-7d7a-4a3d-ba5b-d945066f10ef</name> + <entityField>dateLastClick</entityField> + </neonTreeTableColumn> + <neonTreeTableColumn> + <name>8cf0118f-01c2-44ad-b94f-3244058a9389</name> + <entityField>dateLastChange</entityField> + </neonTreeTableColumn> + <neonTreeTableColumn> + <name>9cc4ec4c-6104-475f-80f0-fb8a93257ff1</name> + <entityField>userLastChange</entityField> + </neonTreeTableColumn> + </columns> + </treeTableViewTemplate> </children> </neonView> diff --git a/preferences/_____PREFERENCES_PROJECT/_____PREFERENCES_PROJECT.aod b/preferences/_____PREFERENCES_PROJECT/_____PREFERENCES_PROJECT.aod index a8160a1096c395f86b245a1988a548bb66fd9f05..50d0738fb82a5a337077ba8f5c5d4760bd59093f 100644 --- a/preferences/_____PREFERENCES_PROJECT/_____PREFERENCES_PROJECT.aod +++ b/preferences/_____PREFERENCES_PROJECT/_____PREFERENCES_PROJECT.aod @@ -142,7 +142,6 @@ <customJDitoProperty> <name>nominatim.filterKeys</name> <description></description> - <property>%aditoprj%/preferences/_____PREFERENCES_PROJECT/customproperties/nominatim.filterkeys/property.js</property> </customJDitoProperty> <customIntegerProperty> <name>duplicates.dataBlockSize</name> diff --git a/preferences/_____PREFERENCES_PROJECT/customproperties/nominatim.filterkeys/property.js b/preferences/_____PREFERENCES_PROJECT/customproperties/nominatim.filterkeys/property.js deleted file mode 100644 index c0996e08813e781b3c7b2c49541a139438d278a1..0000000000000000000000000000000000000000 --- a/preferences/_____PREFERENCES_PROJECT/customproperties/nominatim.filterkeys/property.js +++ /dev/null @@ -1 +0,0 @@ -["building", "office", "townhall"] \ No newline at end of file diff --git a/process/ActivityTask_lib/process.js b/process/ActivityTask_lib/process.js index 8e8d97371e18dc8dbec30301aaf0d87306b1adba..de9551b39f62ba4e4ba1b02259ca03d4cadf8dd3 100644 --- a/process/ActivityTask_lib/process.js +++ b/process/ActivityTask_lib/process.js @@ -1,3 +1,4 @@ +import("system.neonFilter"); import("system.logging"); import("system.entities"); import("system.vars"); @@ -365,7 +366,7 @@ ActivityUtils.createNewActivity = function(pRowId, pAdditionalLinks, pParentCont if (pVisitPlanEntryId) params["VisitPlanEntryId_param"] = pVisitPlanEntryId; - _ActivityTaskUtils._createNew("Activity", pRowId, pAdditionalLinks, pParentContext, pParentId, params) + _ActivityTaskUtils._createNew("Activity", pRowId, pAdditionalLinks, pParentContext, pParentId, params); }; /* @@ -1034,7 +1035,8 @@ _ActivityTaskUtils._createNew = function(pContext, pRowId, pAdditionalLinks, pPa params["ParentId_param"] = pParentId; } - neon.openContext(pContext, null, null, neon.OPERATINGSTATE_NEW, params); + var recipe = neonFilter.createEntityRecordsRecipeBuilder().parameters(params).toString(); + neon.openContextWithRecipe(pContext, null, recipe, neon.OPERATINGSTATE_NEW); }; /** diff --git a/process/Bulkmail_lib/process.js b/process/Bulkmail_lib/process.js index 321ad73a0a9f63d43ee30c66f2a6d28963c77d05..776a7ed0a7059ba01d8a1feff7b542fcb15c540c 100644 --- a/process/Bulkmail_lib/process.js +++ b/process/Bulkmail_lib/process.js @@ -1,3 +1,4 @@ +import("system.neonFilter"); import("JditoFilter_lib"); import("CommunicationBlacklist_lib"); import("EmailFilterHandling_lib"); @@ -417,13 +418,14 @@ BulkMailUtils.openAddRecipientView = function (pContext, pIds, pFilter, pParamet if(Utils.isNullOrEmpty(pFilter.filter)) pFilter.filter= JSON.parse(JditoFilterUtils.getEmptyFilter()).filter; - pFilter= JSON.stringify(pFilter); - neon.openContext("BulkMailAddRecipients", "BulkMailAddRecipientsEdit_view", null, neon.OPERATINGSTATE_VIEW, { + pFilter = JSON.stringify(pFilter); + var recipe = neonFilter.createEntityRecordsRecipeBuilder().parameters({ "ObjectType_param": pContext, "Ids_param": pIds, "Filter_param": pFilter, "Parameters_param": pParameters - }); + }).toString(); + neon.openContextWithRecipe("BulkMailAddRecipients", "BulkMailAddRecipientsEdit_view", recipe, neon.OPERATINGSTATE_VIEW); } /** @@ -577,7 +579,8 @@ BulkMailUtils.newBulkMail = function (pRecipients, pContext, pFilter) "PresetRecipientsContext_param": pContext, "PresetRecipientsFilter_param": pFilter?JSON.stringify(pFilter):null }; - neon.openContext("BulkMail", "BulkMailEdit_view", null, neon.OPERATINGSTATE_NEW, params); + var recipe = neonFilter.createEntityRecordsRecipeBuilder().parameters(params).toString(); + neon.openContextWithRecipe("BulkMail", "BulkMailEdit_view", recipe, neon.OPERATINGSTATE_NEW); } /** @@ -666,7 +669,8 @@ BulkMailUtils.filterNewRecipientsByCondition = function (pBulkMailId, pCondition */ BulkMailUtils.openBulkMail = function (pBulkMailId) { - neon.openContext("BulkMail", "BulkMailMain_view", [pBulkMailId], neon.OPERATINGSTATE_VIEW, null); + var recipe = neonFilter.createEntityRecordsRecipeBuilder().uidsIncludelist([pBulkMailId]).toString(); + neon.openContextWithRecipe("BulkMail", "BulkMailMain_view", recipe, neon.OPERATINGSTATE_VIEW); } /** @@ -730,7 +734,8 @@ BulkMailUtils.copy = function(pBulkMailId) var params = { "CopyBulkMailId_param" : pBulkMailId }; - neon.openContext("BulkMail", null, null, neon.OPERATINGSTATE_NEW, params); + var recipe = neonFilter.createEntityRecordsRecipeBuilder().parameters(params).toString(); + neon.openContextWithRecipe("BulkMail", null, recipe, neon.OPERATINGSTATE_NEW); } /** @@ -744,7 +749,8 @@ BulkMailUtils.createFromMosaicoTemplate = function(pMosaicoTemplateId) var params = { "CreateFromMosaicoTemplateId_param" : pMosaicoTemplateId }; - neon.openContext("BulkMail", null, null, neon.OPERATINGSTATE_NEW, params); + var recipe = neonFilter.createEntityRecordsRecipeBuilder().parameters(params).toString(); + neon.openContextWithRecipe("BulkMail", null, recipe, neon.OPERATINGSTATE_NEW); } /* *Stores the Eml file for a bulkmailrecipient in the Filesystem @@ -949,11 +955,12 @@ SerialLetterUtils.openAddRecipientView = function (pContext, pContactIds, pFilte if (!Utils.isString(pFilter)) pFilter = JSON.stringify(pFilter); - neon.openContext("SerialLetterAddRecipients", "SerialLetterAddRecipientsEdit_view", null, neon.OPERATINGSTATE_VIEW, { + var recipe = neonFilter.createEntityRecordsRecipeBuilder().parameters({ "ObjectType_param": pContext, "ContactIds_param": pContactIds, "ContactFilter_param": pFilter - }); + }).toString(); + neon.openContextWithRecipe("SerialLetterAddRecipients", "SerialLetterAddRecipientsEdit_view", recipe, neon.OPERATINGSTATE_VIEW); } /** @@ -1061,7 +1068,8 @@ SerialLetterUtils.isRecipient = function (pSerialLetterId, pContactId, pRecipien */ SerialLetterUtils.openSerialLetter = function (pSerialLetterId) { - neon.openContext("SerialLetter", "SerialLetterMain_view", [pSerialLetterId], neon.OPERATINGSTATE_VIEW, null); + var recipe = neonFilter.createEntityRecordsRecipeBuilder().uidsIncludelist([pSerialLetterId]).toString(); + neon.openContextWithRecipe("SerialLetter", "SerialLetterMain_view", recipe, neon.OPERATINGSTATE_VIEW); } /** @@ -1093,9 +1101,10 @@ SerialLetterUtils.getSerialLetterTemplate = function (pLetterId, pDocumentTempla SerialLetterUtils.addParticipantsByRowIds = function(pContactIds) { var params = { - "ContactIds_param" : pContactIds + "ContactIds_param": pContactIds }; - neon.openContext("SerialLetterAddRecipients", "SerialLetterAddRecipientsEdit_view", null, neon.OPERATINGSTATE_VIEW, params); + var recipe = neonFilter.createEntityRecordsRecipeBuilder().parameters(params).toString(); + neon.openContextWithRecipe("SerialLetterAddRecipients", "SerialLetterAddRecipientsEdit_view", recipe, neon.OPERATINGSTATE_VIEW); } /** @@ -1109,9 +1118,11 @@ SerialLetterUtils.addParticipantsByRowIds = function(pContactIds) SerialLetterUtils.addParticipantsByCondition = function(pCondition, pSourceTableName) { var params = { - "ContactIds_param" : pCondition, - "comingFrom_param" : pSourceTableName} - neon.openContext("SerialLetterAddRecipients", "SerialLetterAddRecipientsEdit_view", null, neon.OPERATINGSTATE_VIEW, params); + "ContactIds_param": pCondition, + "comingFrom_param": pSourceTableName + }; + var recipe = neonFilter.createEntityRecordsRecipeBuilder().parameters(params).toString(); + neon.openContextWithRecipe("SerialLetterAddRecipients", "SerialLetterAddRecipientsEdit_view", recipe, neon.OPERATINGSTATE_VIEW); } /** diff --git a/process/Campaign_lib/process.js b/process/Campaign_lib/process.js index 73c7e894f26bfb822e0a692228ee61865e91d167..58bdffc44102983beea08ff21599faa982748d66 100644 --- a/process/Campaign_lib/process.js +++ b/process/Campaign_lib/process.js @@ -1,3 +1,4 @@ +import("system.neonFilter"); import("system.entities"); import("Util_lib"); import("system.util"); @@ -229,7 +230,8 @@ CampaignUtils.openSetCampaignStepViewByRowIds = function(pParticipantIds, pCampa "currentCampaignStepId_param": pCampaignStepId, "isUpdate_param": true }; - neon.openContext("CampaignAddParticipants", "CampaignAddParticipantsEdit_view", null, neon.OPERATINGSTATE_VIEW, params); + var recipe = neonFilter.createEntityRecordsRecipeBuilder().parameters(params).toString(); + neon.openContextWithRecipe("CampaignAddParticipants", "CampaignAddParticipantsEdit_view", recipe, neon.OPERATINGSTATE_VIEW); } /** @@ -251,7 +253,8 @@ CampaignUtils.openSetCampaignStepViewByCondition = function(pCondition, pCampaig "currentCampaignStepId_param": pCampaignStepId, "isUpdate_param": true }; - neon.openContext("CampaignAddParticipants", "CampaignAddParticipantsEdit_view", null, neon.OPERATINGSTATE_VIEW, params); + var recipe = neonFilter.createEntityRecordsRecipeBuilder().parameters(params).toString(); + neon.openContextWithRecipe("CampaignAddParticipants", "CampaignAddParticipantsEdit_view", recipe, neon.OPERATINGSTATE_VIEW); } /** @@ -267,7 +270,8 @@ CampaignUtils.openNewCampaignStepView = function(pCampaignId) "campaignId_param": pCampaignId, "campaignSelectionVisible_param": true }; - neon.openContext("CampaignStep", "CampaignStepEdit_view", null, neon.OPERATINGSTATE_NEW, params); + var recipe = neonFilter.createEntityRecordsRecipeBuilder().parameters(params).toString(); + neon.openContextWithRecipe("CampaignStep", "CampaignStepEdit_view", recipe, neon.OPERATINGSTATE_NEW); } /** @@ -276,7 +280,8 @@ CampaignUtils.openNewCampaignStepView = function(pCampaignId) */ CampaignUtils.openNewCampaignView = function() { - neon.openContext("Campaign", "CampaignEdit_view", null, neon.OPERATINGSTATE_NEW, {}); + var recipe = neonFilter.createEntityRecordsRecipeBuilder().parameters({}).toString(); + neon.openContextWithRecipe("Campaign", "CampaignEdit_view", recipe, neon.OPERATINGSTATE_NEW); } /** @@ -717,7 +722,8 @@ CampaignUtils.copyCampaign = function(pCampaignid, pDescription, pEmplContactId, params["Copy_param"] = JSON.stringify(fieldValues) - neon.openContext("Campaign", null, null, neon.OPERATINGSTATE_NEW, params); + var recipe = neonFilter.createEntityRecordsRecipeBuilder().parameters(params).toString(); + neon.openContextWithRecipe("Campaign", null, recipe, neon.OPERATINGSTATE_NEW); } /** @@ -849,7 +855,8 @@ _CampaignUtils._openAddParticipantContext = function(pContext, pTargetDataExpres params["isUpdate_param"] = false; params["dataSourceTableName_param"] = pSourceTableName; - neon.openContext(pContext, pView, null, neon.OPERATINGSTATE_VIEW, params); + var recipe = neonFilter.createEntityRecordsRecipeBuilder().parameters(params).toString(); + neon.openContextWithRecipe(pContext, pView, recipe, neon.OPERATINGSTATE_VIEW); } /* * returns the state of a Eventspecific component dependet on the current Campaign Type @@ -897,9 +904,9 @@ CampaignUtils.getResolvedCampaignStepSqlpPart = function(pCampaignId){ .where("CAMPAIGNSTEP.CAMPAIGN_ID", pCampaignId) .table(); - var res = SqlUtils.getResolvingCaseWhen(campaignSteps, "CAMPAIGNSTEP.CAMPAIGNSTEPID"); + var res = SqlUtils.getResolvingCaseWhen(campaignSteps, "CAMPAIGNSTEP.CAMPAIGNSTEPID"); - return SqlUtils.translateStatementWithQuotes(res); + return SqlUtils.translateStatementWithQuotes(res); } /* diff --git a/process/Contact_lib/process.js b/process/Contact_lib/process.js index ef75d00d32dd94fd8827b744714cd84fa65e7ba7..d74e86d7dcfa7db60b910b96c4d822fa65c19042 100644 --- a/process/Contact_lib/process.js +++ b/process/Contact_lib/process.js @@ -744,7 +744,7 @@ ContactUtils.getCommFilter = function(pOperator, pRawvalue, pFilterOperatorName, resultSqlCond = resultSqlCond + " '%" + pRawvalue + "')"; break; case "ISNULL": - resultSqlCond = "CONTACTID not in " + commpart + ")"; + resultSqlCond = newWhere("CONTACT.CONTACTID", commpart, SqlBuilder.NOT_IN()).toString(); break; case "ISNOTNULL": resultSqlCond = resultSqlCond + ")"; @@ -798,6 +798,62 @@ ContactUtils.isDeletable = function (pCurrentContext, pContactId, pPersonId) .validate(); } +/** + * Gives the contenttitle in right order from salutaion as SubSQL + * + * @param {Boolean} pGetHeadline if you want SALUTATION.HEADLINE as COLUMN + * @param {Boolean} pGetLetterSalutation if you want SALUTATION.LETTERSALUTATION as COLUMN + * + * @return {String} Subsql for DB.expression + */ +ContactUtils.getContactSalutationSubSql = function(pGetHeadline, pGetLetterSalutation) +{ + var salutationColumn; + if(pGetLetterSalutation) + { + salutationColumn = "SALUTATION.LETTERSALUTATION"; + } + else if(pGetHeadline) + { + salutationColumn = "SALUTATION.HEADLINE"; + } + + var sqlHelper = new SqlMaskingUtils(); + var personSelect = ""; + var saltuationPlaceholders = { + "'{fn}'": "PERSON.FIRSTNAME", + "'{ln}'": "PERSON.LASTNAME", + "'{ti}'": "PERSON.TITLE" + }; + + var persSelectFront = "REPLACE("; + for(let [placeholder, column] in saltuationPlaceholders) + { + let persSelectBack = ", " + placeholder + ", " + sqlHelper.isNull(column, "''") + ")"; + if(Utils.isNullOrEmpty(personSelect)) + { + personSelect = persSelectFront + salutationColumn + persSelectBack; + } + else + { + personSelect = persSelectFront + personSelect + persSelectBack; + } + } + + return sqlHelper.isNull( + "(" + newSelect(SqlBuilder.caseWhen("CONTACT.PERSON_ID is null").then(orgSelect).elseValue(personSelect)) + .from("SALUTATION") + .where("SALUTATION.ISOLANGUAGE = CONTACT.ISOLANGUAGE") + .and(newWhere("SALUTATION.SEX = PERSON.GENDER").or("SALUTATION.SEX is null")) + .and(newWhere("SALUTATION.TITLE = PERSON.TITLE").or("SALUTATION.TITLE is null")) + .and(newWhere("SALUTATION.SALUTATION = PERSON.SALUTATION").or("SALUTATION.SALUTATION is null")) + .orderBy("SALUTATION.SEX desc, SALUTATION.TITLE desc") + .toString() + + " " + sqlHelper.limit(1) + + ")" + , sqlHelper.concatWithSeparator(["PERSON.TITLE", "PERSON.FIRSTNAME", "PERSON.LASTNAME"], " ")); +} + /** * object for handling of a single contact * provides static- and instance-functions diff --git a/process/Context_lib/process.js b/process/Context_lib/process.js index e7d67c7ed86b1e65d179e54ba6dc82ea7a7d741b..6af8a77d9a863b186f218f535d2feb071601c1ec 100644 --- a/process/Context_lib/process.js +++ b/process/Context_lib/process.js @@ -1,3 +1,4 @@ +import("system.neonFilter"); import("JditoFilter_lib"); import("system.logging"); import("Util_lib"); @@ -547,7 +548,8 @@ AdminViewUtils.open = function (pUidField, pFields) "Rows_param": JSON.stringify(rows), "Entity_param": vars.get("$sys.currententityname") }; - neon.openContext("DefaultAdminView", "DefaultAdminView_view", [uid], neon.OPERATINGSTATE_VIEW, params); + var recipe = neonFilter.createEntityRecordsRecipeBuilder().uidsIncludelist([uid]).parameters(params).toString(); + neon.openContextWithRecipe("DefaultAdminView", "DefaultAdminView_view", recipe, neon.OPERATINGSTATE_VIEW); } AdminViewUtils.getActionState = function () diff --git a/process/Contract_lib/process.js b/process/Contract_lib/process.js index ad38e53c467cc1943ea18b3f96b39a99f7c4dfd5..bf454d7ff25ec351659b48223bd1c7a2e7608ec4 100644 --- a/process/Contract_lib/process.js +++ b/process/Contract_lib/process.js @@ -1,3 +1,4 @@ +import("system.neonFilter"); import("system.result"); import("system.tools"); import("system.vars"); @@ -56,12 +57,13 @@ ContractUtils.getContractNumberValidationFailString = function() ContractUtils.createNewContract = function(pRelationId) { var params = {}; - - if (pRelationId) + if(pRelationId) + { params["ContactId_param"] = pRelationId; + } - - neon.openContext("Contract", null, null, neon.OPERATINGSTATE_NEW, params); + var recipe = neonFilter.createEntityRecordsRecipeBuilder().parameters(params).toString(); + neon.openContextWithRecipe("Contract", null, recipe, neon.OPERATINGSTATE_NEW); } /** diff --git a/process/DataPrivacy_lib/process.js b/process/DataPrivacy_lib/process.js index c6b9353c2ad5ce736bc7516a9c930d48894bc6f3..405e0d0645f1e86d2e0b67d750292937f33aea3f 100644 --- a/process/DataPrivacy_lib/process.js +++ b/process/DataPrivacy_lib/process.js @@ -1,3 +1,4 @@ +import("system.neonFilter"); import("system.project"); import("system.project"); import("Util_lib"); @@ -607,11 +608,12 @@ DataPrivacyUtils.DisclosureReportName = function() { */ DataPrivacyUtils.openReport = function(pContactId, pReportName, pDSGVOInfo, pLocale) { - neon.openContext("DSGVOReport", "DSGVOReport_view", [], neon.OPERATINGSTATE_VIEW, { + var recipe = neonFilter.createEntityRecordsRecipeBuilder().uidsIncludelist([]).parameters({ "param.ReportName_param": pReportName, "param.ContactId_param": pContactId, "param.DSGVOInfo_param": JSON.stringify(pDSGVOInfo) - }); + }).toString(); + neon.openContextWithRecipe("DSGVOReport", "DSGVOReport_view", recipe, neon.OPERATINGSTATE_VIEW); } /** diff --git a/process/DocumentTemplate_lib/process.js b/process/DocumentTemplate_lib/process.js index 862ad205061423ccd4c0c7050a1abb928c5354e9..7700b24877d7f879d04e344f177d856fc09b1b77 100644 --- a/process/DocumentTemplate_lib/process.js +++ b/process/DocumentTemplate_lib/process.js @@ -1,3 +1,4 @@ +import("system.neonFilter"); import("DocxTemplater_lib"); import("Binary_lib"); import("system.neon"); @@ -462,6 +463,10 @@ DocumentTemplate.prototype.getReplacedContent = function (pReplacements) return this._getReplacedODT(pReplacements); case DocumentTemplate.types.DOCX: case DocumentTemplate.types.DOCM: + for (let i in pReplacements) + { + pReplacements[i] = Utils.escapeXmlCharacters(pReplacements[i]); + } return this._getReplacedDOCX(pReplacements); case DocumentTemplate.types.PLAIN: let plainText = this._replaceText(this.content, pReplacements); @@ -479,12 +484,13 @@ DocumentTemplate.prototype.getReplacedContent = function (pReplacements) * @param {String} pContactId contact id * @param {Placeholder[]} pAdditionalPlaceholders Additional placeholders that should be used. You can use placeholders with the * types FIXEDVALUE and CALLBACKFUNCTION if you want to calculate the replacement values yourself. + * @param {String} pLocale the Language for the translated title. * * @return {String} replaced content */ -DocumentTemplate.prototype.getReplacedContentByContactId = function (pContactId, pAdditionalPlaceholders) +DocumentTemplate.prototype.getReplacedContentByContactId = function (pContactId, pAdditionalPlaceholders, pLocale) { - var replacements = this.getReplacementsByContactIds([pContactId], pAdditionalPlaceholders)[pContactId]; + var replacements = this.getReplacementsByContactIds([pContactId], pAdditionalPlaceholders, undefined, pLocale)[pContactId]; var content = this.getReplacedContent(replacements); return content; @@ -496,12 +502,13 @@ DocumentTemplate.prototype.getReplacedContentByContactId = function (pContactId, * @param {Array} pContactIds contact ids * @param {Placeholder[]} pAdditionalPlaceholders Additional placeholders that should be used. You can use placeholders with the * types FIXEDVALUE and CALLBACKFUNCTION if you want to calculate the replacement values yourself. + * @param {String} pLocale the Language for the translated title. * * @return {Object} replaced content for every contactId */ -DocumentTemplate.prototype.getReplacedContentByContactIds = function (pContactIds, pAdditionalPlaceholders) +DocumentTemplate.prototype.getReplacedContentByContactIds = function (pContactIds, pAdditionalPlaceholders, pLocale) { - var replacements = this.getReplacementsByContactIds(pContactIds, pAdditionalPlaceholders); + var replacements = this.getReplacementsByContactIds(pContactIds, pAdditionalPlaceholders, undefined, pLocale); var contents = {}; for (let contactId in replacements) { @@ -627,13 +634,14 @@ DocumentTemplate.prototype._replaceText = function (pText, pReplacements) * @param {String[]} pForcedPlaceholders these placeholders are always loaded * @param {Placeholder[]} pAdditionalPlaceholders Additional placeholders that should be used. You can use placeholders with the * types FIXEDVALUE and CALLBACKFUNCTION if you want to calculate the replacement values yourself. + * @param {String} pLocale the Language for the translated title. * @return {Object[]} all placeholders needed in this template * @private */ -DocumentTemplate.prototype._getRequiredPlaceholders = function (pForcedPlaceholders, pAdditionalPlaceholders) +DocumentTemplate.prototype._getRequiredPlaceholders = function (pForcedPlaceholders, pAdditionalPlaceholders, pLocale) { var content = this.toString(true); - var placeholders = PlaceholderUtils.getPlaceholders(); + var placeholders = PlaceholderUtils.getPlaceholders(pLocale); if (pAdditionalPlaceholders) placeholders = placeholders.concat(pAdditionalPlaceholders); @@ -663,21 +671,22 @@ DocumentTemplate.prototype._getRequiredPlaceholders = function (pForcedPlacehold * @param {Placeholder[]} pAdditionalPlaceholders Additional placeholders that should be used. You can use placeholders with the * types FIXEDVALUE and CALLBACKFUNCTION if you want to calculate the replacement values yourself. * @param {boolean} pGetAllReplacements if true all Replacements get returned even if theyre not in the document. + * @param {String} pLocale the Language for the translated title. * * @return {Object} Object containing the data. The structure is like {contactId : {placeholderName : replacementValue, ...}, ...} */ -DocumentTemplate.prototype.getReplacementsByContactIds = function (pContactIds, pAdditionalPlaceholders, pGetAllReplacements) +DocumentTemplate.prototype.getReplacementsByContactIds = function (pContactIds, pAdditionalPlaceholders, pGetAllReplacements, pLocale) { var placeholders; if(pGetAllReplacements) { - placeholders = PlaceholderUtils.getPlaceholders(); + placeholders = PlaceholderUtils.getPlaceholders(pLocale); if (pAdditionalPlaceholders) placeholders = placeholders.concat(pAdditionalPlaceholders); } else { - placeholders = this._getRequiredPlaceholders(["{@firstname@}", "{@lastname@}"], pAdditionalPlaceholders); + placeholders = this._getRequiredPlaceholders(["{@firstname@}", "{@lastname@}"], pAdditionalPlaceholders, pLocale); } var contactPlaceholders = []; @@ -948,7 +957,8 @@ LetterUtils.openNewLetter = function (pContactId, pComingFrom) "ContactId_param" : pContactId, "ComingFrom_param" : pComingFrom }; - neon.openContext("Letter", "LetterEdit_view", null, neon.OPERATINGSTATE_VIEW, params); + var recipe = neonFilter.createEntityRecordsRecipeBuilder().parameters(params).toString(); + neon.openContextWithRecipe("Letter", "LetterEdit_view", recipe, neon.OPERATINGSTATE_VIEW); } /** diff --git a/process/DuplicateMerge_lib/process.js b/process/DuplicateMerge_lib/process.js index e65003168d771beb5e7c03d1ea4448ae05efb811..ea3200222f529a8db70ef7330891eebcdccda75a 100644 --- a/process/DuplicateMerge_lib/process.js +++ b/process/DuplicateMerge_lib/process.js @@ -76,6 +76,9 @@ DuplicateMergeUtils.mergeContext = function(pContext, pSourceContactId, pTargetC */ DuplicateMergeUtils.mergePerson = function(pSourceContactId, pTargetContactId) { + //@Workaround @TODO because COMMUNICATION.OBJECT_TYPE is not right -> has to be "Person" + var pObjectType = "Contact"; + var sourcePersonId = newSelect("PERSON_ID") .from("CONTACT") .where("CONTACT.CONTACTID", pSourceContactId) @@ -86,7 +89,7 @@ DuplicateMergeUtils.mergePerson = function(pSourceContactId, pTargetContactId) .cell(); DuplicateMergeUtils._deleteUniqueAttributes(pSourceContactId, pTargetContactId); - var isLinkedDataUpdated = DuplicateMergeUtils._migrateLinkedContactData(pSourceContactId, pTargetContactId); + var isLinkedDataUpdated = DuplicateMergeUtils._migrateLinkedContactData(pSourceContactId, pTargetContactId, pObjectType); var isParticipantsUpdated = DuplicateMergeUtils._migrateParticipantsToNewContact("CAMPAIGNPARTICIPANT", "CONTACT_ID", "CAMPAIGN_ID", pSourceContactId, pTargetContactId); DuplicateMergeUtils._updateOtherContacts(pSourceContactId, sourcePersonId, targetPersonId); @@ -115,6 +118,9 @@ DuplicateMergeUtils.mergePerson = function(pSourceContactId, pTargetContactId) DuplicateMergeUtils.mergeOrganisation = function(pSourceContactId, pTargetContactId) { + //@Workaround @TODO because COMMUNICATION.OBJECT_TYPE is not right -> has to be "Organisation" + var pObjectType = "Contact"; + var sourceOrganisationId = newSelect("ORGANISATION_ID") .from("CONTACT") .where("CONTACT.CONTACTID", pSourceContactId) @@ -126,7 +132,7 @@ DuplicateMergeUtils.mergeOrganisation = function(pSourceContactId, pTargetContac .cell(); DuplicateMergeUtils._deleteUniqueAttributes(pSourceContactId, pTargetContactId); - DuplicateMergeUtils._migrateLinkedContactData(pSourceContactId, pTargetContactId); + DuplicateMergeUtils._migrateLinkedContactData(pSourceContactId, pTargetContactId, pObjectType); DuplicateMergeUtils._migrateParticipantsToNewContact("CAMPAIGNPARTICIPANT", "CONTACT_ID", "CAMPAIGN_ID", pSourceContactId, pTargetContactId); DuplicateMergeUtils._migratePersonsToNewOrganisation(sourceOrganisationId, targetOrganisationId); @@ -204,7 +210,7 @@ DuplicateMergeUtils._deleteUniqueAttributes = function (pSourceContactId, pTarge return deleteCount > 0; } -DuplicateMergeUtils._migrateLinkedContactData = function (pSourceContactId, pTargetContactId) +DuplicateMergeUtils._migrateLinkedContactData = function (pSourceContactId, pTargetContactId, pObjectType) { var updateStatements = new Map(); var currentAlias = db.getCurrentAlias(); @@ -224,7 +230,7 @@ DuplicateMergeUtils._migrateLinkedContactData = function (pSourceContactId, pTar { setStandardsStatements.push( newWhere("COMMUNICATION.OBJECT_ROWID", pSourceContactId) - .and("COMMUNICATION.OBJECT_TYPE", "Contact") + .and("COMMUNICATION.OBJECT_TYPE", pObjectType) .and("COMMUNICATION.MEDIUM_ID", CommUtil.getMediumIdsByCategory("PHONE"), SqlBuilder.IN()) .buildUpdateStatement({"ISSTANDARD" : "0"}) ); @@ -233,7 +239,7 @@ DuplicateMergeUtils._migrateLinkedContactData = function (pSourceContactId, pTar { setStandardsStatements.push( newWhere("COMMUNICATION.OBJECT_ROWID", pSourceContactId) - .and("COMMUNICATION.OBJECT_TYPE", "Contact") + .and("COMMUNICATION.OBJECT_TYPE", pObjectType) .and("COMMUNICATION.MEDIUM_ID", CommUtil.getMediumIdsByCategory("EMAIL"), SqlBuilder.IN()) .buildUpdateStatement({"ISSTANDARD" : "0"}) ); @@ -250,7 +256,7 @@ DuplicateMergeUtils._migrateLinkedContactData = function (pSourceContactId, pTar updateStatements.set(currentAlias, setStandardsStatements); - DuplicateMergeUtils._getLinkedTableInfos(pTargetContactId).forEach(function ([tableName, columnName, additionalCondition, dbAlias]) + DuplicateMergeUtils._getLinkedTableInfos(pTargetContactId, pObjectType).forEach(function ([tableName, columnName, additionalCondition, dbAlias]) { if (!dbAlias) { @@ -281,7 +287,7 @@ DuplicateMergeUtils._migrateLinkedContactData = function (pSourceContactId, pTar //delete leftover communications from the source contact totalChanges += newWhere("COMMUNICATION.OBJECT_ROWID", pSourceContactId) - .and("COMMUNICATION.OBJECT_TYPE", "Contact") + .and("COMMUNICATION.OBJECT_TYPE", pObjectType) .deleteData(); totalChanges += new AttributeRelationQuery(pSourceContactId).deleteAllAttributes(); //delete leftover attributes @@ -357,21 +363,21 @@ DuplicateMergeUtils._buildDeleteOrganisationAndContactQuery = function(pSourceOr * * @returns {String[[]]} Array in the format [TableName, ContactIdColumnName, AdditionalCondition, alias] */ -DuplicateMergeUtils._getLinkedTableInfos = function(pTargetContactId) +DuplicateMergeUtils._getLinkedTableInfos = function(pTargetContactId, pObjectType) { //don't use communications that the target already has var targetComms = newSelect("COMMUNICATION.ADDR") .from("COMMUNICATION") .where("COMMUNICATION.OBJECT_ROWID", pTargetContactId) - .and("COMMUNICATION.OBJECT_TYPE", "Contact") + .and("COMMUNICATION.OBJECT_TYPE", pObjectType) .arrayColumn(); var communicationDedupCondition = targetComms.length > 0 - ? newWhere("COMMUNICATION.ADDR", targetComms, SqlBuilder.NOT_IN()) - : ""; - + ? newWhere("COMMUNICATION.ADDR", targetComms, SqlBuilder.NOT_IN()).and("COMMUNICATION.OBJECT_TYPE", pObjectType) + : newWhere("COMMUNICATION.OBJECT_TYPE", pObjectType); + return[ - ["AB_APPOINTMENTLINK", "OBJECT_ROWID"], + ["AB_APPOINTMENTLINK", "OBJECT_ROWID", newWhere("AB_APPOINTMENTLINK.OBJECT_TYPE", pObjectType)], ["AB_CTILOG", "CONTACT_ID"], ["AB_OBJECTRELATION", "AB_OBJECTRELATIONID"], ["AB_OBJECTRELATION", "OBJECT1_ROWID"], @@ -382,8 +388,7 @@ DuplicateMergeUtils._getLinkedTableInfos = function(pTargetContactId) ["BULKMAIL", "TESTING_CONTACT_ID"], ["CAMPAIGN", "EMPLOYEE_CONTACT_ID"], ["CAMPAIGNSTEP", "EMPLOYEE_CONTACT_ID"], - ["COMMRESTRICTION", "CONTACT_ID"], - ["COMMRESTRICTION", "EMPLOYEE_INVOLVED"], + ["COMMUNICATIONSETTINGS", "CONTACT_ID"], ["COMMUNICATION", "OBJECT_ROWID", communicationDedupCondition], ["COMPETITION", "CONTACT_ID"], ["CONTRACT", "CONTACT_ID"], @@ -396,13 +401,13 @@ DuplicateMergeUtils._getLinkedTableInfos = function(pTargetContactId) ["SALESPROJECT", "CONTACT_ID"], ["TASK", "REQUESTOR_CONTACT_ID"], ["TASK", "EDITOR_CONTACT_ID"], - ["TASKLINK", "OBJECT_ROWID"], + ["TASKLINK", "OBJECT_ROWID", newWhere("TASKLINK.OBJECT_TYPE", pObjectType)], ["ACTIVITY", "RESPONSIBLE"], ["DSGVO", "CONTACT_ID"], ["DSGVOINFO", "CONTACT_ID"], ["TIMETRACKING", "CONTACT_ID"], - ["ACTIVITYLINK", "OBJECT_ROWID"], - ["AB_ATTRIBUTERELATION", "OBJECT_ROWID"], + ["ACTIVITYLINK", "OBJECT_ROWID", newWhere("ACTIVITYLINK.OBJECT_TYPE", pObjectType)], + ["AB_ATTRIBUTERELATION", "OBJECT_ROWID", newWhere("AB_ATTRIBUTERELATION.OBJECT_TYPE", pObjectType)], ["ASYS_CALENDARLINK", "DBID", "", SqlUtils.getSystemAlias()] ]; diff --git a/process/Email_lib/process.js b/process/Email_lib/process.js index 7e2adcf0baba3a0f3e5bdf943f8bb490c259b238..1988968dd95830ffe22b8f90287cb5c6b7528c28 100644 --- a/process/Email_lib/process.js +++ b/process/Email_lib/process.js @@ -1,3 +1,4 @@ +import("system.neonFilter"); import("system.translate"); import("system.question"); import("system.logging"); @@ -93,9 +94,10 @@ EmailWritingUtils.openMailTemplate = function (pToRecipients, pSenderContactId, * @param {String} [pAdditionalPlaceholders] additional placeholders for the email * @param {Array[]} [pUpdateStatements] an array with update statements which will be executed after email is downloaded/sent. * @param {String} pDocumentTemplateTypeClassification The document template type classification. + * @param {String} pLanguage in ISO3 */ EmailWritingUtils.openNewMail = function (pToContactId, pToEmailAddress, pComingFrom, pAttachmentArray, pNotificationMsg, pEmailFilename, - pAdditionalPlaceholders, pUpdateStatements, pDocumentTemplateTypeClassification) + pAdditionalPlaceholders, pUpdateStatements, pDocumentTemplateTypeClassification, pLanguage) { var params = { "ContactId_param" : pToContactId, @@ -105,13 +107,15 @@ EmailWritingUtils.openNewMail = function (pToContactId, pToEmailAddress, pComing "EmailFilename" : pEmailFilename, "AdditionalPlaceholders_param" : JSON.stringify(pAdditionalPlaceholders), "UpdateStatements_param" : JSON.stringify(pUpdateStatements), - "DocumentTemplateTypeClassification_param" : pDocumentTemplateTypeClassification + "DocumentTemplateTypeClassification_param" : pDocumentTemplateTypeClassification, + "Language_param" : pLanguage }; if (pToEmailAddress) params.Recipient_param = pToEmailAddress; - neon.openContext("Email", "EmailEdit_view", null, neon.OPERATINGSTATE_VIEW, params); + var recipe = neonFilter.createEntityRecordsRecipeBuilder().parameters(params).toString(); + neon.openContextWithRecipe("Email", "EmailEdit_view", recipe, neon.OPERATINGSTATE_VIEW); } diff --git a/process/EwsClientSync_lib/process.js b/process/EwsClientSync_lib/process.js index ba282d9be49b5b92dad20f7f5fc502676b803798..f0f5cbfb59be4cd541d737624b9b3632b435e664 100644 --- a/process/EwsClientSync_lib/process.js +++ b/process/EwsClientSync_lib/process.js @@ -1,3 +1,4 @@ +import("system.neonFilter"); import("system.neon"); import("Util_lib"); import("system.translate"); @@ -353,6 +354,7 @@ EwsClientSyncUtils.openEwsSyncAddContactView = function(pContactIds, pFilter, pM "ContactFilter_param": pFilter, "Mode_param": pMode } - neon.openContext("EwsSyncAddContacts", "EwsSyncAddContactsEdit_view", null, neon.OPERATINGSTATE_VIEW, params); + var recipe = neonFilter.createEntityRecordsRecipeBuilder().parameters(params).toString(); + neon.openContextWithRecipe("EwsSyncAddContacts", "EwsSyncAddContactsEdit_view", recipe, neon.OPERATINGSTATE_VIEW); } \ No newline at end of file diff --git a/process/EwsSyncContact_lib/process.js b/process/EwsSyncContact_lib/process.js index 3e42ff46202d4d4c041a6334cd06f96ac10a0fcd..2bd6c50a852b82ff6631260e06a9508dd3fa9cbd 100644 --- a/process/EwsSyncContact_lib/process.js +++ b/process/EwsSyncContact_lib/process.js @@ -687,6 +687,11 @@ EwsClientSyncUtils.updateEntrysInSyncTable = function(pUserMapping, pUserLoginPr var search = JSON.parse(pPropvalClob)["search"]; // search part of the filter JSON var whereCond = db.toFilterCondition(JSON.stringify(search), type); //-------------------------------------------------------------------------- + if(Utils.isNullOrEmptyString(whereCond)) //global variables cannot be read here and must be passed per user + { + whereCond = StringUtils.replaceAll(whereCond, "$$$global.user.contactId$$$", tempUserMapping[2]); + } + var sqlString = new SqlBuilder().selectDistinct("CONTACT.CONTACTID") .from("CONTACT") .whereIfSet(whereCond); diff --git a/process/EwsSyncContact_serverProcess/process.js b/process/EwsSyncContact_serverProcess/process.js index 44c61861a623459ee65f3702c16c09a8f7ef1f08..a3194018914424dd4856fae5198c5f57e47ee135 100644 --- a/process/EwsSyncContact_serverProcess/process.js +++ b/process/EwsSyncContact_serverProcess/process.js @@ -7,22 +7,24 @@ import("system.db"); var maskingUtils = new SqlMaskingUtils(); //get all active usertitles and usernames -var userLoginPropval = newSelect(["ASYS_USERS.PROPVAL", "ASYS_USERS.NAME"], SqlUtils.getSystemAlias()) +var userLoginPropval = newSelect(["ASYS_USERS.PROPVAL", "ASYS_USERS.NAME", "userContactId.PROPVAL"], SqlUtils.getSystemAlias()) .from("ASYS_USERS") -.join("ASYS_USERS", "innerUser.NAME = ASYS_USERS.NAME", "innerUser") -.where(["ASYS_USERS", "PROPVAL", "innerUser"], "true") -.and(["ASYS_USERS", "PROPKEY", "innerUser"], "isActive") +.join("ASYS_USERS", "userName.NAME = ASYS_USERS.NAME", "userName") +.join("ASYS_USERS", "userContactId.NAME = ASYS_USERS.NAME", "userContactId") +.where(["ASYS_USERS", "PROPVAL", "userName"], "true") +.and(["ASYS_USERS", "PROPKEY", "userName"], "isActive") +.and(["ASYS_USERS", "PROPKEY", "userContactId"], "contactID") .and("ASYS_USERS.PROPKEY", "title") .table(); var userMapping = []; var storedSearchMapping = []; -userLoginPropval.forEach(function([pPropval, pName]) +userLoginPropval.forEach(function([pPropval, pName, pContactId]) { if(userMapping[pName] == undefined) { - userMapping[pName] = [pPropval, pName];//userLoginPropval[NAME] = PROPVAL, NAME + userMapping[pName] = [pPropval, pName, pContactId];//userLoginPropval[NAME] = PROPVAL, NAME, CONTACTID } });//mapping diff --git a/process/ExportTemplate_lib/process.js b/process/ExportTemplate_lib/process.js index 0dc59363f125d7bd5cc256acfefe337008c86b34..0c7b4b920559b8d3a088c8e5b4dd3e13e3ae0019 100644 --- a/process/ExportTemplate_lib/process.js +++ b/process/ExportTemplate_lib/process.js @@ -1,3 +1,4 @@ +import("system.neonFilter"); import("system.project"); import("Dependency_lib"); import("Context_lib"); @@ -472,7 +473,8 @@ ExportTemplateUtils.addParticipants = function (pSelection, pSourceTableName) "selectedData_param" : pSelection, "comingFrom_param" : pSourceTableName } - neon.openContext("ExportTemplateSelection", "ExportTemplateSelectionEdit_view", null, neon.OPERATINGSTATE_VIEW, params); + var recipe = neonFilter.createEntityRecordsRecipeBuilder().parameters(params).toString(); + neon.openContextWithRecipe("ExportTemplateSelection", "ExportTemplateSelectionEdit_view", recipe, neon.OPERATINGSTATE_VIEW); } /** diff --git a/process/FilterViewAction_lib/process.js b/process/FilterViewAction_lib/process.js index ede6618261ac763fd7f7cc05f4a7f3414c5e04fc..f79e4d3d548b181bf63dd9098ca8584d5db05c81 100644 --- a/process/FilterViewAction_lib/process.js +++ b/process/FilterViewAction_lib/process.js @@ -23,45 +23,66 @@ function FilterViewActionUtils() {} FilterViewActionUtils.getUidsByEntityFilter = function (pContext, pFilter, pParameters) { if (Utils.isString(pFilter)) + { pFilter = JSON.parse(pFilter); - + } if (Utils.isString(pParameters)) + { pParameters = JSON.parse(pParameters); - + } + //uids from Person and Organisation are loaded with simple sql queries because that's much faster than over the entity' + //TODO: design modular + filter recipe if (pContext == "Person" && "condition" in pFilter) { return new SqlBuilder() - .selectDistinct("CONTACT.CONTACTID") - .from("PERSON") - .join("CONTACT", "CONTACT.PERSON_ID = PERSON.PERSONID") - .join("ORGANISATION", "ORGANISATION.ORGANISATIONID = CONTACT.ORGANISATION_ID") - .leftJoin("ADDRESS", "ADDRESS.ADDRESSID = CONTACT.ADDRESS_ID") - .whereIfSet(pFilter.condition) - .arrayColumn(); + .selectDistinct("CONTACT.CONTACTID") + .from("PERSON") + .join("CONTACT", "CONTACT.PERSON_ID = PERSON.PERSONID") + .join("ORGANISATION", "ORGANISATION.ORGANISATIONID = CONTACT.ORGANISATION_ID") + .leftJoin("ADDRESS", "ADDRESS.ADDRESSID = CONTACT.ADDRESS_ID") + .whereIfSet(pFilter.condition) + .arrayColumn(); } if (pContext == "Organisation" && "condition" in pFilter) { return new SqlBuilder() - .selectDistinct("CONTACT.CONTACTID") - .from("ORGANISATION") - .join("CONTACT", newWhere("ORGANISATION.ORGANISATIONID = CONTACT.ORGANISATION_ID").and("CONTACT.PERSON_ID is null")) - .leftJoin("ADDRESS", "ADDRESS.ADDRESSID = CONTACT.ADDRESS_ID") - .leftJoin("CLASSIFICATIONSTORAGE", "CLASSIFICATIONSTORAGE.OBJECT_ROWID = CONTACT.CONTACTID") - .whereIfSet(pFilter.condition) - .arrayColumn(); + .selectDistinct("CONTACT.CONTACTID") + .from("ORGANISATION") + .join("CONTACT", newWhere("ORGANISATION.ORGANISATIONID = CONTACT.ORGANISATION_ID").and("CONTACT.PERSON_ID is null")) + .leftJoin("ADDRESS", "ADDRESS.ADDRESSID = CONTACT.ADDRESS_ID") + .leftJoin("CLASSIFICATIONSTORAGE", "CLASSIFICATIONSTORAGE.OBJECT_ROWID = CONTACT.CONTACTID") + .whereIfSet(pFilter.condition) + .arrayColumn(); } - + if(pContext == "Activity" && "condition" in pFilter) + { + return new SqlBuilder() + .selectDistinct("ACTIVITY.ACTIVITYID") + .from("ACTIVITY") + .leftJoin("CONTACT", "CONTACT.CONTACTID = ACTIVITY.RESPONSIBLE") + .leftJoin("PERSON", "PERSON.PERSONID = CONTACT.PERSON_ID") + .whereIfSet(pFilter.condition) + .arrayColumn(); + } + //General solution to get the uids using entities.getRows var loadRowsConfig = entities.createConfigForLoadingRows() - .entity(ContextUtils.getEntity(pContext)) - .fields(["#UID"]) - if (pFilter.filter) + .entity(ContextUtils.getEntity(pContext)) + .fields(["#UID"]); + + if (Utils.isNullOrEmpty(pFilter.filter)) + { loadRowsConfig.filter(JSON.stringify(pFilter.filter)); - - if(pParameters) - Object.keys(pParameters).forEach(function(key){loadRowsConfig.addParameter(key, pParameters[key])}); - + } + + if(Utils.isNullOrEmpty(pParameters)) + { + Object.keys(pParameters).forEach(function(key){ + loadRowsConfig.addParameter(key, pParameters[key]) + }); + } + return entities.getRows(loadRowsConfig).map(function (row) { return row["#UID"]; diff --git a/process/ImporterMappingFunctions_lib/documentation.adoc b/process/ImporterMappingFunctions_lib/documentation.adoc index a84498b944e1178bb37c620657214fc7260c703a..512eac55c69185441414a530f6dbb5af4e849c19 100644 --- a/process/ImporterMappingFunctions_lib/documentation.adoc +++ b/process/ImporterMappingFunctions_lib/documentation.adoc @@ -180,7 +180,9 @@ Properties for iComm |Address | The address for the communication entry. |Medium | The medium ID. (It can also be a flexible value like "{2}" or "{TEMP.MED}"). -|ContactID | The ID of the entry in the contact table. +|ContactID | The ID of the entry in the contact table. @deprecated It should be used ObjectRowid and ObjectType +|ObjectRowid | The UID of the entry from a context. +|ObjectType | The type of the entry from a context. |Standard (opt.)| If this address should be set to standard (boolean). |====== diff --git a/process/ImporterMappingFunctions_lib/process.js b/process/ImporterMappingFunctions_lib/process.js index 97f5f2f5fae75f2610fe13f9997bd2adaa57689c..ac22fd455182bb40178aed05281f7381d3ea703d 100644 --- a/process/ImporterMappingFunctions_lib/process.js +++ b/process/ImporterMappingFunctions_lib/process.js @@ -474,7 +474,9 @@ function iKeywordAttribute (pObject) * Values of the mapping line: * Address req -- the address for the communication entry * Medium req -- the medium id - * ContactID req -- the id of the entry in the contact table + * ContactID req -- the id of the entry in the contact table @deprecated It should be used ObjectRowid and ObjectType + * ObjectRowid req -- the UID of the entry from a context. + * ObjectType req -- the type of the entry from a context. * Standard opt -- the standard value (boolean) * * @name iComm @@ -485,23 +487,53 @@ function iKeywordAttribute (pObject) function iComm (pObject) { if (!this.doIfCheck(pObject)) + { return true; + } + var address = this.InputRecord[pObject.Address]; var medium = this.InputRecord[pObject.Medium]; - var contact = this.InputRecord[pObject.ContactID]; + var objectRowId = this.InputRecord[pObject.ObjectRowid]; + var objectType = this.InputRecord[pObject.ObjectType]; var standard = "0"; + //@deprecated It should be used ObjectRowid and ObjectType + var contactId = this.InputRecord[pObject.ContactID]; + if (address == undefined) + { address = this.resolveSymbol(pObject, pObject.Address); + } if (medium == undefined) + { medium = this.resolveSymbol(pObject, pObject.Medium); - if (contact == undefined) - contact = this.resolveSymbol(pObject, pObject.ContactID); + } + if (objectRowId == undefined) + { + objectRowId = this.resolveSymbol(pObject, pObject.ObjectRowid); + } + if (objectType == undefined) + { + objectType = this.resolveSymbol(pObject, pObject.ObjectType); + } + //@deprecated It should be used ObjectRowid and ObjectType + if (contactId == undefined) + { + contactId = this.resolveSymbol(pObject, pObject.ContactID); + } if (pObject.Standard) + { standard = "1"; + } + + //@deprecated It should be used ObjectRowid and ObjectType + objectRowId = objectRowId || contactId; + objectType = objectType || "Contact"; - if (!address || !medium || !contact) + if (!address || !medium || !objectRowId) + { return true; + } const COMMUNICATION = this.getTableCase("communication"); const COMMUNICATIONID = this.getColumnCase("communicationid"); @@ -523,8 +555,8 @@ function iComm (pObject) var sql = new SqlBuilder(this.Config.AliasTo) .select([COMMUNICATIONID, ADDR, MEDIUM_ID, ISSTANDARD]) .from(COMMUNICATION) - .where(COMMUNICATION + "." + OBJECT_ROWID, contact) - .and(COMMUNICATION + "." + OBJECT_TYPE, "Contact") + .where(COMMUNICATION + "." + OBJECT_ROWID, objectRowId) + .and(COMMUNICATION + "." + OBJECT_TYPE, objectType) .and(COMMUNICATION + "." + MEDIUM_ID, CommUtil.getMediumIdsByCategory(mediumCategory), SqlBuilder.IN()); var existingData = sql.table(null, null, this.getConfiguredTimeout()); @@ -544,8 +576,8 @@ function iComm (pObject) if (!existingComm) { - var columns = [COMMUNICATIONID, ADDR, MEDIUM_ID, OBJECT_ROWID, ISSTANDARD]; - this.insertData(COMMUNICATION, columns, null, [util.getNewUUID(), address, medium, contact, standard], this.Config.AliasTo); + var columns = [COMMUNICATIONID, ADDR, MEDIUM_ID, OBJECT_ROWID, OBJECT_TYPE, ISSTANDARD]; + this.insertData(COMMUNICATION, columns, null, [util.getNewUUID(), address, medium, objectRowId, objectType, standard], this.Config.AliasTo); } else { diff --git a/process/Importer_test/process.js b/process/Importer_test/process.js index ae87faf6a219c62c9d4452955dd5f169f743c1b4..e6f3b8e2851373c24ed57172c855b30c63351808 100644 --- a/process/Importer_test/process.js +++ b/process/Importer_test/process.js @@ -165,7 +165,7 @@ var testfunctions = { return this.fixtures; }.bind(this), ImportCommand: "insert+update", - Mapping: [[iComm, {Address: 0, Medium: 1, ContactID: 2}]] + Mapping: [[iComm, {Address: 0, Medium: 1, ObjectRowid: 2, ObjectType: 3}]] } return runFn(config); }, diff --git a/process/KeywordRegistry_basic/process.js b/process/KeywordRegistry_basic/process.js index a2e9888cf830259bd023e441b894afb256e758ae..0d8c94bafb8e57613b7d193ee1f677c562e63eed 100644 --- a/process/KeywordRegistry_basic/process.js +++ b/process/KeywordRegistry_basic/process.js @@ -64,8 +64,6 @@ $KeywordRegistry.organisationType = function(){return "OrganisationType";}; $KeywordRegistry.organisationType$manufacturer = function(){return "ORGMANUF";}; $KeywordRegistry.organisationType$competitor = function(){return "ORGCOMP";}; -$KeywordRegistry.personGender = function(){return "PersonGender";}; - $KeywordRegistry.taskStatus = function(){return "TaskStatus";}; $KeywordRegistry.taskStatus$new = function(){return "NEW";}; $KeywordRegistry.taskStatus$unassigned = function(){return "UNASSIGNED";}; @@ -240,6 +238,8 @@ $KeywordRegistry.classificationType$organisation = function(){return "Organisati $KeywordRegistry.personGender = function(){return "PersonGender";}; $KeywordRegistry.personGender$other = function(){return "o";}; +$KeywordRegistry.personGender$male = function(){return "m";}; +$KeywordRegistry.personGender$female = function(){return "f";}; $KeywordRegistry.permissionCondType = function(){return "PermissionCondType";}; $KeywordRegistry.permissionAccessType = function(){return "PermissionAccessType";}; diff --git a/process/Leadimport_lib/process.js b/process/Leadimport_lib/process.js index fe39f235edf4b0dc3ac432073beae11b2a2db662..f92149a9377ecbc47ea11108097e9d441d3f71d2 100644 --- a/process/Leadimport_lib/process.js +++ b/process/Leadimport_lib/process.js @@ -370,7 +370,7 @@ LeadImportUtils.getMappedOutputvalue = function (pField, pInputValue) { */ LeadImportUtils.getImportFieldDef = function(pID) { - var ImportFieldDef = newSelect(["distinct FIELDNUMBER", SqlMaskingUtils.prototype.trim("MAPPINGFIELD"), "''"]) + var ImportFieldDef = newSelect(["distinct FIELDNUMBER", new SqlMaskingUtils().trim("MAPPINGFIELD"), "''"]) .from("IMPORTFIELD") .where("IMPORTFIELD.LEADIMPORT_ID", pID) .and("MAPPINGFIELD is not null") diff --git a/process/Neon_lib/process.js b/process/Neon_lib/process.js index c9400e2255c4ec752d4be18e2d0d0ddfe10992ad..5b5337367d4002bc294000ecc42c381b0e15433c 100644 --- a/process/Neon_lib/process.js +++ b/process/Neon_lib/process.js @@ -1,3 +1,4 @@ +import("system.neonFilter"); import("Sql_lib"); import("Date_lib"); import("system.vars"); @@ -39,7 +40,10 @@ CopyModuleUtils.openNewModules = function(pNeonContext, pModulesMapping) } if(newids.length > 0) - neon.openContext(pNeonContext, null, newids, neon.OPERATINGSTATE_VIEW, null); + { + var recipe = neonFilter.createEntityRecordsRecipeBuilder().uidsIncludelist(newids).toString(); + neon.openContextWithRecipe(pNeonContext, null, recipe, neon.OPERATINGSTATE_VIEW); + } } } } diff --git a/process/Observation_lib/process.js b/process/Observation_lib/process.js index b90768b91d3fc9479af4ebda50b97d225408bb96..4f7986e3dc0e5c541b02f40c44d7026835c8dfd6 100644 --- a/process/Observation_lib/process.js +++ b/process/Observation_lib/process.js @@ -1,3 +1,4 @@ +import("system.neonFilter"); import("JditoFilter_lib"); import("Keyword_lib"); import("Util_lib"); @@ -794,9 +795,9 @@ Observation.insertAction = function () if (selectedUIDs.length > 1) { params["ObjectIds_param"] = JSON.stringify(selectedUIDs); - neon.openContext("ObservationMultiple", "ObservationMultipleEdit_view", null, neon.OPERATINGSTATE_VIEW, params); + var ctxRecipe = neonFilter.createEntityRecordsRecipeBuilder().parameters(params).toString(); + neon.openContextWithRecipe("ObservationMultiple", "ObservationMultipleEdit_view", ctxRecipe, neon.OPERATINGSTATE_VIEW); return; - } else if (selectedUIDs.length) { @@ -808,7 +809,8 @@ Observation.insertAction = function () params["ObjectFilter_param"] = filter; } - neon.openContext("Observation", "ObservationEdit_view", null, neon.OPERATINGSTATE_NEW, params); + var recipe = neonFilter.createEntityRecordsRecipeBuilder().parameters(params).toString(); + neon.openContextWithRecipe("Observation", "ObservationEdit_view", recipe, neon.OPERATINGSTATE_NEW); } /** diff --git a/process/Offer_lib/process.js b/process/Offer_lib/process.js index d749cf7ea38e5da012870e9989b895e856b3b4a2..03b4b6e521ceeb65f358c6f7eaff603ebf27cab1 100644 --- a/process/Offer_lib/process.js +++ b/process/Offer_lib/process.js @@ -1,3 +1,4 @@ +import("system.neonFilter"); import("system.project"); import("system.SQLTYPES"); import("system.vars"); @@ -95,17 +96,26 @@ OfferUtils.createNewOffer = function(pContextId, pRowId, pRelationId, pInfo, pSo params["ContactIds_param"] = JSON.stringify(pRelationId); } else + { params["ContactId_param"] = pRelationId; + } } if(pSourceObjectType == "Activity") + { params["ActivityId_param"] = pSourceObjectRowId; + } else if(pSourceObjectType == "Task") + { params["TaskId_param"] = pSourceObjectRowId; + } - if (pInfo) + if(pInfo) + { params["Info_param"] = pInfo; - neon.openContext("Offer", null, null, neon.OPERATINGSTATE_NEW, params); + } + var recipe = neonFilter.createEntityRecordsRecipeBuilder().parameters(params).toString(); + neon.openContextWithRecipe("Offer", null, recipe, neon.OPERATINGSTATE_NEW); } /** @@ -374,7 +384,8 @@ OfferUtils.buildOfferReport = function (pOfferID, pExclDiscountGroupcodes) */ OfferUtils.openOfferReport = function (pOfferID) { - neon.openContext("Offer", "OfferReport_view", [pOfferID], neon.OPERATINGSTATE_VIEW, null, true) + var recipe = neonFilter.createEntityRecordsRecipeBuilder().uidsIncludelist([pOfferID]).toString(); + neon.openContextWithRecipe("Offer", "OfferReport_view", recipe, neon.OPERATINGSTATE_VIEW, null, true); } /** @@ -387,7 +398,9 @@ OfferUtils.openOfferReport = function (pOfferID) OfferUtils.copyOffer = function (pOfferId, pOfferData) { if (!pOfferData) + { pOfferData = {}; + } var params = { "OfferOriginal_Id_param": pOfferId, "ContactId_param": pOfferData.contactId, @@ -399,9 +412,10 @@ OfferUtils.copyOffer = function (pOfferId, pOfferData) "OfferPaymentTerm_param": pOfferData.paymentTerm || "", "ObjectType_param": pOfferData.objectType || "", "ObjectRowId_param": pOfferData.objectRowId || "", - "Discount_param" : pOfferData.discount || "" + "Discount_param": pOfferData.discount || "" }; - neon.openContext("Offer", null, null, neon.OPERATINGSTATE_NEW, params); + var recipe = neonFilter.createEntityRecordsRecipeBuilder().parameters(params).toString(); + neon.openContextWithRecipe("Offer", null, recipe, neon.OPERATINGSTATE_NEW); } /** @@ -479,7 +493,8 @@ OfferUtils.copyToOrder = function (pOfferId, pContextId, pRowId, pContactId, pLa params["Copy_param"] = JSON.stringify(fieldparams); params["OfferId_param"] = pOfferId; - neon.openContext("Order", null, null, neon.OPERATINGSTATE_NEW, params); + var recipe = neonFilter.createEntityRecordsRecipeBuilder().parameters(params).toString(); + neon.openContextWithRecipe("Order", null, recipe, neon.OPERATINGSTATE_NEW); } /** diff --git a/process/Order_lib/process.js b/process/Order_lib/process.js index d0f8ac754425c878b6a7f0b05390bf672b271bfe..09648dec1ca49c4584b6912a7ecb12a4e76b2e00 100644 --- a/process/Order_lib/process.js +++ b/process/Order_lib/process.js @@ -1,3 +1,4 @@ +import("system.neonFilter"); import("Employee_lib"); import("system.entities"); import("Offer_lib"); @@ -98,7 +99,8 @@ OrderUtils.createNewOrder = function(pContextId, pRowId, pRelationId) } params["Copy_param"] = JSON.stringify(fieldparams); - neon.openContext("Order", null, null, neon.OPERATINGSTATE_NEW, params); + var recipe = neonFilter.createEntityRecordsRecipeBuilder().parameters(params).toString(); + neon.openContextWithRecipe("Order", null, recipe, neon.OPERATINGSTATE_NEW); } /** @@ -150,7 +152,8 @@ OrderUtils.copyOrder = function (pSourceOrderId, pOrderData, pCopyLinks) params["Links_param"] = JSON.stringify(links); } - neon.openContext("Order", null, null, neon.OPERATINGSTATE_NEW, params); + var recipe = neonFilter.createEntityRecordsRecipeBuilder().parameters(params).toString(); + neon.openContextWithRecipe("Order", null, recipe, neon.OPERATINGSTATE_NEW); } @@ -469,7 +472,8 @@ OrderUtils.buildOrderReport = function (pOrderID) */ OrderUtils.openOrderReport = function (pOrderID) { - neon.openContext("Order", "OrderReport_view", [pOrderID], neon.OPERATINGSTATE_VIEW, null, true); + var recipe = neonFilter.createEntityRecordsRecipeBuilder().uidsIncludelist([pOrderID]).toString(); + neon.openContextWithRecipe("Order", "OrderReport_view", recipe, neon.OPERATINGSTATE_VIEW, null, true); } /** @@ -657,7 +661,8 @@ OrderUtils.buildReminderReport = function (pOrderID) */ OrderUtils.openReminderReport = function (pOrderID) { - neon.openContext("Order", "OrderReminderReport_view", [pOrderID], neon.OPERATINGSTATE_VIEW, null, true); + var recipe = neonFilter.createEntityRecordsRecipeBuilder().uidsIncludelist([pOrderID]).toString(); + neon.openContextWithRecipe("Order", "OrderReminderReport_view", recipe, neon.OPERATINGSTATE_VIEW, null, true); } diff --git a/process/Organisation_lib/process.js b/process/Organisation_lib/process.js index 735a0af10761b2b84fde48a3744f0c71977050fc..0fe9f10f561acc43a01c1514f12da885a9a789c1 100644 --- a/process/Organisation_lib/process.js +++ b/process/Organisation_lib/process.js @@ -1,3 +1,4 @@ +import("system.neonFilter"); import("system.project"); import("system.neon"); import("Util_lib"); @@ -198,7 +199,7 @@ var activityData = activityQuery.table() .leftJoin("PERSON", "c.PERSON_ID = PERSONID") .leftJoin("AB_ATTRIBUTE", "AB_ATTRIBUTE.AB_ATTRIBUTEID = TASKATTENDEES.DEPARTMENT_ID") .where("CONTACT.ORGANISATION_ID", pOrgId) - .groupBy("TASK.TASKID") + .groupBy("TASK.TASKID, TASK.SUBJECT, TASK.DESCRIPTION, TASK.STATUS") .table(); @@ -250,7 +251,8 @@ var activityData = activityQuery.table() */ OrgUtils.openOrgReport = function(pContactId) { - neon.openContext("Organisation", "OrganisationReport_view", [pContactId], neon.OPERATINGSTATE_VIEW, null); + var recipe = neonFilter.createEntityRecordsRecipeBuilder().uidsIncludelist([pContactId]).toString(); + neon.openContextWithRecipe("Organisation", "OrganisationReport_view", recipe, neon.OPERATINGSTATE_VIEW); } /** diff --git a/process/Placeholder_lib/process.js b/process/Placeholder_lib/process.js index e96b202d0b755d65adbbc90123e4e5cf6867e129..63c6b905aa5c0b513abf056a13b910f97ee360ae 100644 --- a/process/Placeholder_lib/process.js +++ b/process/Placeholder_lib/process.js @@ -32,7 +32,6 @@ PlaceholderUtils.getPlaceholders = function (pLocale, pIsExportTemplateField) locale = pLocale; /***************************************************************************************************************/ //Definition of available basic Placeholders. For project specific Placeholders, use CustomPlaceholder_lib - _addAddressFormat("address", "{street} {buildingno}", null, translate.text("Address", locale)); _addAddressFormat("zipCode", "{zip}", null , translate.text("Zip", locale)); _addAddressFormat("city", "{city}", null , translate.text("City", locale)); @@ -58,7 +57,7 @@ PlaceholderUtils.getPlaceholders = function (pLocale, pIsExportTemplateField) _addSqlPart("senderPhone", CommUtil.getStandardSubSqlPhone(), Placeholder.targets.SENDER, translate.text("Sender phone")); _addSqlPart("senderEmail", CommUtil.getStandardSubSqlMail(), Placeholder.targets.SENDER, translate.text("Sender email")); _addSqlPart("senderName", sqlUtil.concatWithSeparator(["SALUTATION", "TITLE", "FIRSTNAME", "LASTNAME"]), Placeholder.targets.SENDER, translate.text("Sender name")); - _addSqlPart("date", "'" + datetime.toDate(vars.get("sys.date"), translate.text("dd.MM.yyyy")) + "'", Placeholder.targets.SENDER, translate.text("Date")); + _addSqlPart("date", "'" + datetime.toDate(vars.get("sys.date"), translate.text("MM/dd/yyyy", locale), null, locale) + "'", Placeholder.targets.SENDER, translate.text("Date")); /***************************************************************************************************************/ diff --git a/process/PostalAddress_lib/process.js b/process/PostalAddress_lib/process.js index 996991dd07a980a6ba91ed1851171b0d2a8ce9f2..82c5cfaf23b28bc71157f67e0b9cb4d2f69fc28e 100644 --- a/process/PostalAddress_lib/process.js +++ b/process/PostalAddress_lib/process.js @@ -80,7 +80,7 @@ AddressUtils.getFormattedOnlineAddressById = function(pAddressId) * @return {String} */ AddressUtils.getAddress = function(pContactId) { - var address = newSelect("CONTACTID, ADDRESS, BUILDINGNO, ZIP, CITY, \"NAME\", FIRSTNAME, LASTNAME, TITLE") + var address = newSelect(["CONTACT.CONTACTID", "ADDRESS.ADDRESS", "ADDRESS.BUILDINGNO", "ADDRESS.ZIP", "ADDRESS.CITY", "ORGANISATION.NAME", "PERSON.FIRSTNAME", "PERSON.LASTNAME", "PERSON.TITLE"]) .from(ContactUtils.getFullContactString()) .whereIfSet("CONTACT.CONTACTID", pContactId) .arrayRow(true); diff --git a/process/Product_lib/process.js b/process/Product_lib/process.js index 8f4bb1eed7f67baf70d5a0db00972763e4757d57..51f13baf3e085ce7e6282fb8f08addf0733c93ae 100644 --- a/process/Product_lib/process.js +++ b/process/Product_lib/process.js @@ -410,6 +410,34 @@ ProductUtils.removeImage = function(pProductId) return ImageUtils.remove("PRODUCT", "IMAGE", pProductId); } +/** + * returns the product name for the productid + * + * @param {String} pProductId the id of the product. + * @return {String} the name of the product + */ +ProductUtils.getProductName = function(pProductId) +{ + return newSelect("PRODUCT.PRODUCTNAME") + .from("PRODUCT") + .whereIfSet("PRODUCT.PRODUCTID", pProductId) + .cell(); +} + +/** + * returns the product name for the productid + * + * @param {String} pProductIdColumn the productIdColumn + * @return {String} the name of the product as subSQL + */ +ProductUtils.getProductNameSubSql = function(pProductIdColumn) +{ + return newSelect("PRODUCT.PRODUCTNAME") + .from("PRODUCT") + .whereIfSet("PRODUCT.PRODUCTID = " + pProductIdColumn) + .toString(); +} + /** * Class containing utility functions for Prod2Prod (Parts list) * diff --git a/process/Salesproject_lib/process.js b/process/Salesproject_lib/process.js index 79246a7b3dc35d3602432b0e8ff70fd87dd2e4b8..22e9234279b99eac85a2e860af2de96ac7b3fb7d 100644 --- a/process/Salesproject_lib/process.js +++ b/process/Salesproject_lib/process.js @@ -1,3 +1,4 @@ +import("system.neonFilter"); import("Contact_lib"); import("Person_lib"); import("system.datetime"); @@ -111,10 +112,13 @@ Salesproject.createNewSalesproject= function(pRelationId) { var params = {}; - if (pRelationId) + if(pRelationId) + { params["ContactId_param"] = pRelationId; + } - neon.openContext("Salesproject", null, null, neon.OPERATINGSTATE_NEW, params); + var recipe = neonFilter.createEntityRecordsRecipeBuilder().parameters(params).toString(); + neon.openContextWithRecipe("Salesproject", null, recipe, neon.OPERATINGSTATE_NEW); } /** diff --git a/process/Ticket_lib/process.js b/process/Ticket_lib/process.js index b04606139a0fa727898edd989b312b7dbd0b06ad..346b20656c076c81f42a150996d4ba15b408e8fe 100644 --- a/process/Ticket_lib/process.js +++ b/process/Ticket_lib/process.js @@ -1,3 +1,4 @@ +import("system.neonFilter"); import("Context_lib"); import("system.neon"); import("system.question"); @@ -216,7 +217,7 @@ TicketUtils.openNewSupportticket = function( pStr_pirmaryKeyId, pStr_contextName "PresetLinks_param": JSON.stringify( arr_links) }; - neon.openContext("SupportTicket", "SupportTicketEdit_view", null, neon.OPERATINGSTATE_NEW, obj_links); + neon.openContextWithRecipe("SupportTicket", "SupportTicketEdit_view", neonFilter.createEntityRecordsRecipeBuilder().parameters(obj_links).toString(), neon.OPERATINGSTATE_NEW); return true; } @@ -237,6 +238,6 @@ TicketUtils.openNewSupportticketWithLinks = function( pArr_linksParams) var obj_links = { "PresetLinks_param": JSON.stringify( pArr_linksParams) } - neon.openContext("SupportTicket", "SupportTicketEdit_view", null, neon.OPERATINGSTATE_NEW, obj_links); + neon.openContextWithRecipe("SupportTicket", "SupportTicketEdit_view", neonFilter.createEntityRecordsRecipeBuilder().parameters(obj_links).toString(), neon.OPERATINGSTATE_NEW); return true; } \ No newline at end of file diff --git a/process/Timetracking_lib/process.js b/process/Timetracking_lib/process.js index 515d922a39f50ec7da63cf26ca307ed2df3d34ad..c1466135cda6a2624d43129108df689a10ab5825 100644 --- a/process/Timetracking_lib/process.js +++ b/process/Timetracking_lib/process.js @@ -1,3 +1,4 @@ +import("system.neonFilter"); import("Sql_lib"); import("system.db"); import("system.neon"); @@ -45,7 +46,8 @@ Timetracking.createNewTimeTracking = function (pRowId) "RowId_param" : pRowId }; - neon.openContext("Timetracking", null, null, neon.OPERATINGSTATE_NEW, params); + var recipe = neonFilter.createEntityRecordsRecipeBuilder().parameters(params).toString(); + neon.openContextWithRecipe("Timetracking", null, recipe, neon.OPERATINGSTATE_NEW); } /* diff --git a/process/TopicTree_lib/process.js b/process/TopicTree_lib/process.js index f44dd23a2542ef644a1282981a8f8afd4c54f8a9..cc46b867ed55675a04cafacd39721b2ce6ab962b 100644 --- a/process/TopicTree_lib/process.js +++ b/process/TopicTree_lib/process.js @@ -742,6 +742,8 @@ TopicTreeUtils.returnTopicTree = function (pIsRowCount) treeElements[i][16] = treeElements[i][0]; //uid = TOPICTREEID needed for the tree treeElements[i][17] = "NEON:DUE"; //icon (different colors depending on the state treeElements[i][18] = expanded; //expanded + + treeElements[i][19] = Utils.toBoolean(treeElements[i][2]) ? translate.text("Active") : translate.text("Inactive");//active displayValue } } @@ -793,7 +795,7 @@ TopicTreeUtils.paste = function (pIsTopTopic) } } - var isCut = vars.exists("$context.Cut") && vars.get("$context.Cut") != null; + var isCut = vars.exists("$context.HasToBeCut") && Utils.toBoolean(vars.get("$context.HasToBeCut")); var copy = JSON.parse(vars.get("$context.Copied"))["dataset"]; //copied data var cTopicTreeId = copy["#UID"]; var topicAndActive = newSelect("TOPICTREE.TOPIC, TOPICTREE.ACTIVE").from("TOPICTREE").where("TOPICTREE.TOPICTREEID", cTopicTreeId).arrayRow(); @@ -829,6 +831,10 @@ TopicTreeUtils.paste = function (pIsTopTopic) pLayerDeeper = TopicTreeUtils.getDeeperLayer(pSorting_Layer_1, pSorting_Layer_2, pSorting_Layer_3, pSorting_Layer_4, pSorting_Layer_5, pSorting_Layer_6); cond = newWhere("TOPICTREE.ASSIGNEDTO", pTopicTreeId); } + else + { + pLayerDeeper = pLayer; + } var maxSortingOneLayerDeeper = newSelect("max(" + pLayerDeeper + ")") @@ -959,7 +965,7 @@ TopicTreeUtils.paste = function (pIsTopTopic) } } - if(isCut && subTopicsToDelete) + if(isCut && subTopicsToDelete && subTopicsToDelete.length > 0) { db.deletes([newWhere("TOPICTREE.TOPICTREEID", subTopicsToDelete, SqlBuilder.IN()).buildDeleteStatement()]);//delete before insert (duplicate id) } diff --git a/process/Util_lib/process.js b/process/Util_lib/process.js index 42c2763d2e82d9167560425830b6bd901c91b879..d935eba8c47383393000708b178fd6ee026141ac 100644 --- a/process/Util_lib/process.js +++ b/process/Util_lib/process.js @@ -532,6 +532,21 @@ Utils.buildFilterObj = function(pFilterObj, pFieldName, pOperator, pContentType, return parentFilter; } +/** + * Escapes all special characters for a XML-String + * + * @param {String} pString a string for escaping xml-chars + * @return {String} XML-escaped string + */ +Utils.escapeXmlCharacters = function(pString) { + return pString + .replace(/&/g, "&") + .replace(/</g, "<") + .replace(/>/g, ">") + .replace(/"/g, """) + .replace(/'/g, "'"); +} + /** * Class containing static utility functions for regular expression objects (RegExp) * Do not create an instance of this diff --git a/process/Workflow_lib/process.js b/process/Workflow_lib/process.js index ea29726019519a5c016234f70c75cb679c52a364..9fcd029adb869db690b74b2ea94f944c9be34225 100644 --- a/process/Workflow_lib/process.js +++ b/process/Workflow_lib/process.js @@ -1,9 +1,9 @@ +import("system.neonFilter"); import("system.db"); import("Employee_lib"); import("system.process"); import("Util_lib"); import("system.text"); -import("system.logging"); import("system.project"); import("Sql_lib"); import("system.neon"); @@ -56,12 +56,13 @@ WorkflowUtils.openNewInstance = function (pVariables, pTargetIds, pTargetContext Object.assign(pVariables, WorkflowVariables.getTargetVariables(pTargetIds, pTargetContext)); - neon.openContext("WorkflowLauncher", "WorkflowLauncherEdit_view", null, neon.OPERATINGSTATE_VIEW, { + var recipe = neonFilter.createEntityRecordsRecipeBuilder().parameters({ "ProcessVariables_param": JSON.stringify(pVariables), "TargetContext_param": pVariables[WorkflowVariables.TARGET_CONTEXT()], "TargetFilter_param": pSelectionFilter ? JSON.stringify(pSelectionFilter) : "", "Targets_param": JSON.stringify(pTargetIds) - }); + }).toString(); + neon.openContextWithRecipe("WorkflowLauncher", "WorkflowLauncherEdit_view", recipe, neon.OPERATINGSTATE_VIEW); } /** diff --git a/process/emailWrite/process.js b/process/emailWrite/process.js index 2d132154a460082543360ca73c38b9bedfe052de..f1ead1a6d169e769a3dbd8f76622441e2d3ac9e4 100644 --- a/process/emailWrite/process.js +++ b/process/emailWrite/process.js @@ -13,11 +13,13 @@ var uid = vars.get("$local.uid"); if (entity == "Communication_entity") { - var contactId = newSelect("COMMUNICATION.OBJECT_ROWID") + var [contactId, language] = newSelect(["COMMUNICATION.OBJECT_ROWID", "CONTACT.ISOLANGUAGE"]) .from("COMMUNICATION") + .leftJoin("CONTACT", "COMMUNICATION.OBJECT_ROWID = CONTACT.CONTACTID") .where("COMMUNICATION.COMMUNICATIONID", uid) - .cell(); - EmailWritingUtils.openNewMail(contactId, address); + .arrayRow(); + + EmailWritingUtils.openNewMail(contactId, address, undefined, undefined, undefined, undefined, undefined, undefined, undefined, language); } else neon.openUrl("mailto:" + encodeURIComponent(address), false); \ No newline at end of file diff --git a/report/Organisation_report/Kommunikationsdaten.jrxml b/report/Organisation_report/Kommunikationsdaten.jrxml index a69e57170703a339e55db8f7c76f42f6e00d2a1d..6cfef4ca4befcdefa3b5a3d74016b93921e8e9da 100644 --- a/report/Organisation_report/Kommunikationsdaten.jrxml +++ b/report/Organisation_report/Kommunikationsdaten.jrxml @@ -22,7 +22,7 @@ <textFieldExpression><![CDATA[$F{KINDOFCOMM}]]></textFieldExpression> </textField> <textField> - <reportElement x="103" y="1" width="100" height="15" uuid="48bf1f6b-953a-44b6-9ebf-504203afa70d"/> + <reportElement x="103" y="1" width="255" height="15" uuid="48bf1f6b-953a-44b6-9ebf-504203afa70d"/> <textElement> <font size="8"/> </textElement> diff --git a/report/Organisation_report/reportData.jrxml b/report/Organisation_report/reportData.jrxml index 04d3aaa0664d919a845de1e15437a2a4fc137881..8bc863499408731c012ab8eecef8761896e3b8c9 100644 --- a/report/Organisation_report/reportData.jrxml +++ b/report/Organisation_report/reportData.jrxml @@ -1,8 +1,8 @@ <?xml version="1.0" encoding="UTF-8"?> <jasperReport xmlns="http://jasperreports.sourceforge.net/jasperreports" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://jasperreports.sourceforge.net/jasperreports http://jasperreports.sourceforge.net/xsd/jasperreport.xsd" name="Kundenstammblatt" pageWidth="595" pageHeight="842" columnWidth="555" leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20" uuid="e7a916c8-3f9a-497d-84bb-3909b15271ea"> - <property name="ireport.zoom" value="1.2100000000000002"/> + <property name="ireport.zoom" value="1.771561000000001"/> <property name="ireport.x" value="0"/> - <property name="ireport.y" value="0"/> + <property name="ireport.y" value="150"/> <parameter name="myAddr" class="java.lang.String"/> <parameter name="ORGAddr" class="java.lang.String"/> <parameter name="ORGAttr" class="java.lang.String"/> @@ -14,7 +14,7 @@ <parameter name="adito.datasource.subdataComm" class="java.lang.Object"/> <parameter name="adito.datasource.subdataPers" class="java.lang.Object"/> <parameter name="SUBREPORT_DIR" class="java.lang.String" isForPrompting="false"> - <defaultValueExpression><![CDATA["C:\\Entwicklung\\stable2019\\project\\basic\\report\\Organisation_report\\"]]></defaultValueExpression> + <defaultValueExpression><![CDATA["C:\\Users\\f.maier\\Documents\\AditoProjects\\UltimateBasic\\report\\Organisation_report\\"]]></defaultValueExpression> </parameter> <parameter name="adito.image.myLogo" class="java.lang.String"/> <parameter name="adito.datasource.subdataHist" class="java.lang.Object"/>