diff --git a/entity/ActivityLink_entity/ActivityLink_entity.aod b/entity/ActivityLink_entity/ActivityLink_entity.aod index be409330d53def37793e2e0c360ff2aad8aa61c6..bf6bac7e1b76d842c6774c8da6d4540b43122a85 100644 --- a/entity/ActivityLink_entity/ActivityLink_entity.aod +++ b/entity/ActivityLink_entity/ActivityLink_entity.aod @@ -10,9 +10,11 @@ </entityProvider> <entityField> <name>ACTIVITYLINKID</name> + <valueProcess>%aditoprj%/entity/ActivityLink_entity/entityfields/activitylinkid/valueProcess.js</valueProcess> </entityField> <entityField> <name>OBJECT_TYPE</name> + <title>Object type</title> <consumer>Contexts</consumer> <linkedContext>Context</linkedContext> <displayValueProcess>%aditoprj%/entity/ActivityLink_entity/entityfields/object_type/displayValueProcess.js</displayValueProcess> @@ -22,22 +24,12 @@ <title>Beziehung</title> <consumer>Objects</consumer> <linkedContextProcess>%aditoprj%/entity/ActivityLink_entity/entityfields/object_rowid/linkedContextProcess.js</linkedContextProcess> + <displayValueProcess>%aditoprj%/entity/ActivityLink_entity/entityfields/object_rowid/displayValueProcess.js</displayValueProcess> </entityField> <entityField> <name>ACTIVITY_ID</name> + <valueProcess>%aditoprj%/entity/ActivityLink_entity/entityfields/activity_id/valueProcess.js</valueProcess> </entityField> - <entityParameter> - <name>ObjectRowid_param</name> - <expose v="true" /> - <triggerRecalculation v="true" /> - <description>PARAMETER</description> - </entityParameter> - <entityParameter> - <name>ObjectType_param</name> - <expose v="true" /> - <triggerRecalculation v="true" /> - <description>PARAMETER</description> - </entityParameter> <entityProvider> <name>Link</name> <fieldType>DEPENDENCY_IN</fieldType> @@ -54,11 +46,7 @@ </dependencies> <children> <entityParameter> - <name>ObjectRowid_param</name> - <expose v="true" /> - </entityParameter> - <entityParameter> - <name>ObjectType_param</name> + <name>ActivityId_param</name> <expose v="true" /> </entityParameter> </children> @@ -88,6 +76,11 @@ <fieldName>#PROVIDER</fieldName> </dependency> </entityConsumer> + <entityParameter> + <name>ActivityId_param</name> + <expose v="true" /> + <description>PARAMETER</description> + </entityParameter> </entityFields> <recordContainers> <dbRecordContainer> diff --git a/entity/ActivityLink_entity/entityfields/activity_id/valueProcess.js b/entity/ActivityLink_entity/entityfields/activity_id/valueProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..3d7f987d124710e6e2987bac550e6c8b6eaaa119 --- /dev/null +++ b/entity/ActivityLink_entity/entityfields/activity_id/valueProcess.js @@ -0,0 +1,4 @@ +import("system.vars"); +import("system.result"); + +result.string(vars.get("$param.ActivityId_param")) \ No newline at end of file diff --git a/entity/ActivityLink_entity/entityfields/activitylinkid/valueProcess.js b/entity/ActivityLink_entity/entityfields/activitylinkid/valueProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..86ef789e064a4016f2d12c432498dc23474807aa --- /dev/null +++ b/entity/ActivityLink_entity/entityfields/activitylinkid/valueProcess.js @@ -0,0 +1,7 @@ +import("system.util"); +import("system.vars"); +import("system.result"); +import("system.neon"); + +if(vars.get("$sys.recordstate") == neon.OPERATINGSTATE_NEW) + result.string(util.getNewUUID()); \ No newline at end of file diff --git a/entity/ActivityLink_entity/entityfields/object_rowid/displayValueProcess.js b/entity/ActivityLink_entity/entityfields/object_rowid/displayValueProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..4bec272246cb114439a2de8479cbfa9c9feebfe7 --- /dev/null +++ b/entity/ActivityLink_entity/entityfields/object_rowid/displayValueProcess.js @@ -0,0 +1,7 @@ +import("system.vars"); +import("system.db"); +import("system.result"); +import("Context_lib"); + +if (vars.exists("$field.OBJECT_TYPE") && vars.get("$field.OBJECT_TYPE")) + result.string(db.cell(ContextUtils.getNameSql(vars.get("$field.OBJECT_TYPE"), vars.get("$field.OBJECT_ROWID")))); \ No newline at end of file diff --git a/entity/ActivityLink_entity/recordcontainers/db/conditionProcess.js b/entity/ActivityLink_entity/recordcontainers/db/conditionProcess.js index af5991c0cd552dd6b51fe8b99cf7e95139c84c5f..f5f56bc8bb2e41b4b3a1e60bba4cbde45f4a1e05 100644 --- a/entity/ActivityLink_entity/recordcontainers/db/conditionProcess.js +++ b/entity/ActivityLink_entity/recordcontainers/db/conditionProcess.js @@ -1,10 +1,13 @@ +import("system.logging"); +import("system.vars"); import("system.db"); import("system.result"); import("Sql_lib"); +logging.log("GET: " + vars.get("$param.ActivityId_param")) + var cond = SqlCondition.begin() - .andPrepareVars("ACTIVITYLINK.OBJECT_ROWID", "$param.ObjectRowid_param") - .andPrepareVars("ACTIVITYLINK.OBJECT_TYPE", "$param.ObjectType_param"); + .andPrepareVars("ACTIVITYLINK.ACTIVITY_ID", "$param.ActivityId_param"); //TODO: use a preparedCondition when available #1030812 #1034026 -result.string(db.translateCondition(cond.build("1 = 1"))); \ No newline at end of file +result.string(db.translateCondition(cond.build("1 = 0"))); \ No newline at end of file diff --git a/entity/Activity_entity/Activity_entity.aod b/entity/Activity_entity/Activity_entity.aod index 529db43dc538ae9bcd337e7b1b9af89ff79c3eea..c87bb1efc1619306e28b8fa5b550a04239efdafa 100644 --- a/entity/Activity_entity/Activity_entity.aod +++ b/entity/Activity_entity/Activity_entity.aod @@ -147,7 +147,6 @@ </entityField> <entityParameter> <name>ActivityId_param</name> - <expose v="true" /> <mandatory v="false" /> <description>PARAMETER</description> </entityParameter> @@ -184,12 +183,9 @@ </dependency> <children> <entityParameter> - <name>ObjectRowid_param</name> - <code>%aditoprj%/entity/Activity_entity/entityfields/links/children/objectrowid_param/code.js</code> - </entityParameter> - <entityParameter> - <name>ObjectType_param</name> - <code>%aditoprj%/entity/Activity_entity/entityfields/links/children/objecttype_param/code.js</code> + <name>ActivityId_param</name> + <code>%aditoprj%/entity/Activity_entity/entityfields/links/children/activityid_param/code.js</code> + <expose v="true" /> </entityParameter> </children> </entityConsumer> @@ -238,6 +234,24 @@ <fieldName>Activities</fieldName> <isConsumer v="false" /> </entityDependency> + <entityDependency> + <name>207920cd-b4b8-4f40-b6c4-6e25d4df9947</name> + <entityName>Offer_entity</entityName> + <fieldName>Activities</fieldName> + <isConsumer v="false" /> + </entityDependency> + <entityDependency> + <name>b086fbf7-aa94-441f-a33c-e2ca8eda5dcd</name> + <entityName>Order_entity</entityName> + <fieldName>Activities</fieldName> + <isConsumer v="false" /> + </entityDependency> + <entityDependency> + <name>00b4f354-5b82-4071-b70c-acab4780a2de</name> + <entityName>Product_entity</entityName> + <fieldName>Activities</fieldName> + <isConsumer v="false" /> + </entityDependency> </dependencies> <children> <entityParameter> diff --git a/entity/Activity_entity/entityfields/links/children/activityid_param/code.js b/entity/Activity_entity/entityfields/links/children/activityid_param/code.js new file mode 100644 index 0000000000000000000000000000000000000000..a8267b62060b4bd30cedaba4713f4421a6e6f9ff --- /dev/null +++ b/entity/Activity_entity/entityfields/links/children/activityid_param/code.js @@ -0,0 +1,4 @@ +import("system.vars"); +import("system.result"); + +result.string(vars.get("$field.ACTIVITYID")); \ No newline at end of file diff --git a/entity/Activity_entity/entityfields/subject_details/valueProcess.js b/entity/Activity_entity/entityfields/subject_details/valueProcess.js index 54c6e810026576c01cf069b5170c47972ab83fa5..7cecd3b427054a5a7558dcc24adaf976c33bc034 100644 --- a/entity/Activity_entity/entityfields/subject_details/valueProcess.js +++ b/entity/Activity_entity/entityfields/subject_details/valueProcess.js @@ -2,8 +2,5 @@ import("system.vars"); import("system.result"); import("Keyword_lib"); -var histMedium; -histMedium = vars.get("$field.CATEGORY"); -if (histMedium){ - result.string(vars.get("$field.SUBJECT") + " (" + LegacyKeywordUtils.getViewValue("ACTIVITY.CATEGORY", histMedium) + ")"); -} \ No newline at end of file +var histMedium = vars.get("$field.CATEGORY"); +result.string(vars.get("$field.SUBJECT") + (histMedium ? " (" + LegacyKeywordUtils.getViewValue("ACTIVITY.CATEGORY", histMedium) + ")" : "")); diff --git a/entity/Activity_entity/recordcontainers/db/conditionProcess.js b/entity/Activity_entity/recordcontainers/db/conditionProcess.js index f8ca95a041f3a052a2e375692dcaa0bdf90d52f3..9c8391b37c47aa5a3d88d8d58f8d5b59760f8470 100644 --- a/entity/Activity_entity/recordcontainers/db/conditionProcess.js +++ b/entity/Activity_entity/recordcontainers/db/conditionProcess.js @@ -9,6 +9,7 @@ if (vars.exists("$param.RowId_param") && vars.get("$param.RowId_param") && vars. var activityLinkCond = SqlCondition.begin().andPrepareVars("ACTIVITYLINK.OBJECT_ROWID", "$param.RowId_param") .andPrepareVars("ACTIVITYLINK.OBJECT_TYPE", "$param.ObjectId_param"); + // TODO: more performant way than IN. Maybe a join?? cond.and(db.translateStatement(activityLinkCond.buildSql("ACTIVITY.ACTIVITYID in (select ACTIVITYLINK.ACTIVITY_ID from ACTIVITYLINK", "1=2", ")"))) } diff --git a/entity/Contract_entity/Contract_entity.aod b/entity/Contract_entity/Contract_entity.aod index 63e27f36ce46b52a027faca288afabb2cb5ea5ab..028d790dd26fa08b59c9e9fcb010c6ebaf5745f7 100644 --- a/entity/Contract_entity/Contract_entity.aod +++ b/entity/Contract_entity/Contract_entity.aod @@ -138,6 +138,10 @@ <name>RowId_param</name> <code>%aditoprj%/entity/Contract_entity/entityfields/activities/children/rowid_param/code.js</code> </entityParameter> + <entityParameter> + <name>ObjectId_param</name> + <code>%aditoprj%/entity/Contract_entity/entityfields/activities/children/objectid_param/code.js</code> + </entityParameter> </children> </entityConsumer> <entityConsumer> @@ -255,6 +259,13 @@ </entityParameter> </children> </entityConsumer> + <entityActionField> + <name>newActivity</name> + <fieldType>ACTION</fieldType> + <title>New activity</title> + <onActionProcess>%aditoprj%/entity/Contract_entity/entityfields/newactivity/onActionProcess.js</onActionProcess> + <iconId>NEON:HISTORY</iconId> + </entityActionField> </entityFields> <recordContainers> <dbRecordContainer> diff --git a/entity/Contract_entity/entityfields/activities/children/objectid_param/code.js b/entity/Contract_entity/entityfields/activities/children/objectid_param/code.js new file mode 100644 index 0000000000000000000000000000000000000000..008915f61deac19ccdd40fff81701de63eb3b6a2 --- /dev/null +++ b/entity/Contract_entity/entityfields/activities/children/objectid_param/code.js @@ -0,0 +1,4 @@ +import("system.result"); +import("Context_lib"); + +result.string(ContextUtils.getCurrentContextId()); \ No newline at end of file diff --git a/entity/Contract_entity/entityfields/newactivity/onActionProcess.js b/entity/Contract_entity/entityfields/newactivity/onActionProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..5d64774798acd58cd8c536f765182b5e9e94b7ff --- /dev/null +++ b/entity/Contract_entity/entityfields/newactivity/onActionProcess.js @@ -0,0 +1,4 @@ +import("system.vars"); +import("Activity_lib"); + +ActivityUtils.createNewActivity(vars.getString("$field.CONTRACTID")); \ No newline at end of file diff --git a/entity/Offer_entity/Offer_entity.aod b/entity/Offer_entity/Offer_entity.aod index a8c757e5b623e80ef92a703451f2a586dd312cd3..2297b80962e45811beb9c262263d9d95d4f110c0 100644 --- a/entity/Offer_entity/Offer_entity.aod +++ b/entity/Offer_entity/Offer_entity.aod @@ -368,6 +368,33 @@ <fieldName>LanguagesISO3Code</fieldName> </dependency> </entityConsumer> + <entityConsumer> + <name>Activities</name> + <title>Activities</title> + <fieldType>DEPENDENCY_OUT</fieldType> + <dependency> + <name>dependency</name> + <entityName>Activity_entity</entityName> + <fieldName>LinkedObjects</fieldName> + </dependency> + <children> + <entityParameter> + <name>ObjectId_param</name> + <code>%aditoprj%/entity/Offer_entity/entityfields/activities/children/objectid_param/code.js</code> + </entityParameter> + <entityParameter> + <name>RowId_param</name> + <code>%aditoprj%/entity/Offer_entity/entityfields/activities/children/rowid_param/code.js</code> + </entityParameter> + </children> + </entityConsumer> + <entityActionField> + <name>newActivity</name> + <fieldType>ACTION</fieldType> + <title>New activity</title> + <onActionProcess>%aditoprj%/entity/Offer_entity/entityfields/newactivity/onActionProcess.js</onActionProcess> + <iconId>NEON:HISTORY</iconId> + </entityActionField> </entityFields> <recordContainers> <dbRecordContainer> diff --git a/entity/Offer_entity/entityfields/activities/children/objectid_param/code.js b/entity/Offer_entity/entityfields/activities/children/objectid_param/code.js new file mode 100644 index 0000000000000000000000000000000000000000..008915f61deac19ccdd40fff81701de63eb3b6a2 --- /dev/null +++ b/entity/Offer_entity/entityfields/activities/children/objectid_param/code.js @@ -0,0 +1,4 @@ +import("system.result"); +import("Context_lib"); + +result.string(ContextUtils.getCurrentContextId()); \ No newline at end of file diff --git a/entity/Offer_entity/entityfields/activities/children/rowid_param/code.js b/entity/Offer_entity/entityfields/activities/children/rowid_param/code.js new file mode 100644 index 0000000000000000000000000000000000000000..e9d96c53826855e51135a90c02ef5d82900fb815 --- /dev/null +++ b/entity/Offer_entity/entityfields/activities/children/rowid_param/code.js @@ -0,0 +1,4 @@ +import("system.result"); +import("system.vars"); + +result.string(vars.get("$field.OFFERID")); \ No newline at end of file diff --git a/entity/Offer_entity/entityfields/newactivity/onActionProcess.js b/entity/Offer_entity/entityfields/newactivity/onActionProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..d93e51415984160000410db0d04359823d7ceaa4 --- /dev/null +++ b/entity/Offer_entity/entityfields/newactivity/onActionProcess.js @@ -0,0 +1,4 @@ +import("system.vars"); +import("Activity_lib"); + +ActivityUtils.createNewActivity(vars.getString("$field.OFFERID")); \ No newline at end of file diff --git a/entity/Order_entity/Order_entity.aod b/entity/Order_entity/Order_entity.aod index 3940f0c89477b9234dc1176030eb430a8c7a37c0..4afb6c516c1caa25aecd7211b004f98488fdce70 100644 --- a/entity/Order_entity/Order_entity.aod +++ b/entity/Order_entity/Order_entity.aod @@ -358,6 +358,33 @@ <mandatory v="false" /> <description>PARAMETER</description> </entityParameter> + <entityConsumer> + <name>Activities</name> + <title>Activity</title> + <fieldType>DEPENDENCY_OUT</fieldType> + <dependency> + <name>dependency</name> + <entityName>Activity_entity</entityName> + <fieldName>LinkedObjects</fieldName> + </dependency> + <children> + <entityParameter> + <name>RowId_param</name> + <code>%aditoprj%/entity/Order_entity/entityfields/activities/children/rowid_param/code.js</code> + </entityParameter> + <entityParameter> + <name>ObjectId_param</name> + <code>%aditoprj%/entity/Order_entity/entityfields/activities/children/objectid_param/code.js</code> + </entityParameter> + </children> + </entityConsumer> + <entityActionField> + <name>newActivity</name> + <fieldType>ACTION</fieldType> + <title>New activity</title> + <onActionProcess>%aditoprj%/entity/Order_entity/entityfields/newactivity/onActionProcess.js</onActionProcess> + <iconId>NEON:HISTORY</iconId> + </entityActionField> </entityFields> <recordContainers> <dbRecordContainer> diff --git a/entity/Order_entity/entityfields/activities/children/objectid_param/code.js b/entity/Order_entity/entityfields/activities/children/objectid_param/code.js new file mode 100644 index 0000000000000000000000000000000000000000..008915f61deac19ccdd40fff81701de63eb3b6a2 --- /dev/null +++ b/entity/Order_entity/entityfields/activities/children/objectid_param/code.js @@ -0,0 +1,4 @@ +import("system.result"); +import("Context_lib"); + +result.string(ContextUtils.getCurrentContextId()); \ No newline at end of file diff --git a/entity/Order_entity/entityfields/activities/children/rowid_param/code.js b/entity/Order_entity/entityfields/activities/children/rowid_param/code.js new file mode 100644 index 0000000000000000000000000000000000000000..229c1cc55241a6acc700ad611ba131aadd83ac89 --- /dev/null +++ b/entity/Order_entity/entityfields/activities/children/rowid_param/code.js @@ -0,0 +1,4 @@ +import("system.result"); +import("system.vars"); + +result.string(vars.get("$field.SALESORDERID")); \ No newline at end of file diff --git a/entity/Order_entity/entityfields/newactivity/onActionProcess.js b/entity/Order_entity/entityfields/newactivity/onActionProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..0dfbcbcb9f63def6b709cc3ccfc54b72f6ac116b --- /dev/null +++ b/entity/Order_entity/entityfields/newactivity/onActionProcess.js @@ -0,0 +1,4 @@ +import("system.vars"); +import("Activity_lib"); + +ActivityUtils.createNewActivity(vars.getString("$field.SALESORDERID")); \ No newline at end of file diff --git a/entity/Person_entity/Person_entity.aod b/entity/Person_entity/Person_entity.aod index 1ec47e052201d9851a7720131fcd674112dd885a..85459cd4368c0f729b6fbbffb897ca5ab4712567 100644 --- a/entity/Person_entity/Person_entity.aod +++ b/entity/Person_entity/Person_entity.aod @@ -384,10 +384,10 @@ Usually this is used for filtering COMMUNICATION-entries by a specified contact <valueProcess>%aditoprj%/entity/Person_entity/entityfields/rel_relationship/valueProcess.js</valueProcess> </entityField> <entityActionField> - <name>openEditDefaultsView_action</name> + <name>openEditDefaultsView</name> <fieldType>ACTION</fieldType> <title>Edit defaults</title> - <onActionProcess>%aditoprj%/entity/Person_entity/entityfields/openeditdefaultsview_action/onActionProcess.js</onActionProcess> + <onActionProcess>%aditoprj%/entity/Person_entity/entityfields/openeditdefaultsview/onActionProcess.js</onActionProcess> <iconId>VAADIN:WRENCH</iconId> </entityActionField> <entityActionField> diff --git a/entity/Person_entity/entityfields/openeditdefaultsview_action/onActionProcess.js b/entity/Person_entity/entityfields/openeditdefaultsview_action/onActionProcess.js deleted file mode 100644 index b0fcb98f2ebff8d3bc44ad52b7b2b7b515875f46..0000000000000000000000000000000000000000 --- a/entity/Person_entity/entityfields/openeditdefaultsview_action/onActionProcess.js +++ /dev/null @@ -1,3 +0,0 @@ -import("system.vars"); -import("system.neon"); -neon.openContext("Person", "ContactEditDefaults_view", [vars.get("$sys.uid")], neon.OPERATINGSTATE_EDIT, null); diff --git a/entity/Product_entity/Product_entity.aod b/entity/Product_entity/Product_entity.aod index 2cd464e46c26353a7790d6bbf77fc1bb5679c6fe..d2902bb8988c83b2ea5721dabfdf8350f3a422b2 100644 --- a/entity/Product_entity/Product_entity.aod +++ b/entity/Product_entity/Product_entity.aod @@ -290,6 +290,33 @@ <fieldName>LanguagesISO3Code</fieldName> </dependency> </entityConsumer> + <entityConsumer> + <name>Activities</name> + <title>Activity</title> + <fieldType>DEPENDENCY_OUT</fieldType> + <dependency> + <name>dependency</name> + <entityName>Activity_entity</entityName> + <fieldName>LinkedObjects</fieldName> + </dependency> + <children> + <entityParameter> + <name>ObjectId_param</name> + <code>%aditoprj%/entity/Product_entity/entityfields/activities/children/objectid_param/code.js</code> + </entityParameter> + <entityParameter> + <name>RowId_param</name> + <code>%aditoprj%/entity/Product_entity/entityfields/activities/children/rowid_param/code.js</code> + </entityParameter> + </children> + </entityConsumer> + <entityActionField> + <name>newActivity</name> + <fieldType>ACTION</fieldType> + <title>New activity</title> + <onActionProcess>%aditoprj%/entity/Product_entity/entityfields/newactivity/onActionProcess.js</onActionProcess> + <iconId>NEON:HISTORY</iconId> + </entityActionField> </entityFields> <recordContainers> <dbRecordContainer> diff --git a/entity/Product_entity/entityfields/activities/children/objectid_param/code.js b/entity/Product_entity/entityfields/activities/children/objectid_param/code.js new file mode 100644 index 0000000000000000000000000000000000000000..008915f61deac19ccdd40fff81701de63eb3b6a2 --- /dev/null +++ b/entity/Product_entity/entityfields/activities/children/objectid_param/code.js @@ -0,0 +1,4 @@ +import("system.result"); +import("Context_lib"); + +result.string(ContextUtils.getCurrentContextId()); \ No newline at end of file diff --git a/entity/Product_entity/entityfields/activities/children/rowid_param/code.js b/entity/Product_entity/entityfields/activities/children/rowid_param/code.js new file mode 100644 index 0000000000000000000000000000000000000000..eaa8f9632d85a5a73a33bfe5e9ce56e6dddd390e --- /dev/null +++ b/entity/Product_entity/entityfields/activities/children/rowid_param/code.js @@ -0,0 +1,4 @@ +import("system.result"); +import("system.vars"); + +result.string(vars.get("$field.PRODUCTID")); \ No newline at end of file diff --git a/entity/Product_entity/entityfields/newactivity/onActionProcess.js b/entity/Product_entity/entityfields/newactivity/onActionProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..b2be977254ab92678a76d702b47f2de59d379a37 --- /dev/null +++ b/entity/Product_entity/entityfields/newactivity/onActionProcess.js @@ -0,0 +1,4 @@ +import("system.vars"); +import("Activity_lib"); + +ActivityUtils.createNewActivity(vars.getString("$field.PRODUCTID")); \ No newline at end of file diff --git a/entity/Salesproject_entity/Salesproject_entity.aod b/entity/Salesproject_entity/Salesproject_entity.aod index 187aeefd5659a4287be44398fc10894bdb9d090f..93027687026652ae17e3034af4d629ac96fbf99b 100644 --- a/entity/Salesproject_entity/Salesproject_entity.aod +++ b/entity/Salesproject_entity/Salesproject_entity.aod @@ -387,6 +387,13 @@ </entityParameter> </children> </entityConsumer> + <entityActionField> + <name>newActivity</name> + <fieldType>ACTION</fieldType> + <title>New activity</title> + <onActionProcess>%aditoprj%/entity/Salesproject_entity/entityfields/newactivity/onActionProcess.js</onActionProcess> + <iconId>NEON:HISTORY</iconId> + </entityActionField> </entityFields> <recordContainers> <dbRecordContainer> diff --git a/entity/Salesproject_entity/entityfields/newactivity/onActionProcess.js b/entity/Salesproject_entity/entityfields/newactivity/onActionProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..0a299b330a3c72d55249e6bd6d52a51512d0867b --- /dev/null +++ b/entity/Salesproject_entity/entityfields/newactivity/onActionProcess.js @@ -0,0 +1,4 @@ +import("system.vars"); +import("Activity_lib"); + +ActivityUtils.createNewActivity(vars.getString("$field.SALESPROJECTID")); \ No newline at end of file diff --git a/language/_____LANGUAGE_EXTRA/_____LANGUAGE_EXTRA.aod b/language/_____LANGUAGE_EXTRA/_____LANGUAGE_EXTRA.aod index 6d07ea71054ed1240d173780e33d8f25959c7380..2e8efe2be5fecf6e058410ebe85732907514a80b 100644 --- a/language/_____LANGUAGE_EXTRA/_____LANGUAGE_EXTRA.aod +++ b/language/_____LANGUAGE_EXTRA/_____LANGUAGE_EXTRA.aod @@ -2338,10 +2338,13 @@ <key>Links</key> </entry> <entry> - <key>Linktype</key> + <key>${PRODUCT_LIB_NO_PRODUCT_ID} function: %0</key> </entry> <entry> - <key>${PRODUCT_LIB_NO_PRODUCT_ID} function: %0</key> + <key>Object type</key> + </entry> + <entry> + <key>Level</key> </entry> </keyValueMap> <font name="Dialog" style="0" size="11" /> diff --git a/language/_____LANGUAGE_de/_____LANGUAGE_de.aod b/language/_____LANGUAGE_de/_____LANGUAGE_de.aod index f18b405fac7b4178ba760ed64e2f568dddc9ba67..ffe27c577a316c2ca4ac5122cd26811e3ad99ce6 100644 --- a/language/_____LANGUAGE_de/_____LANGUAGE_de.aod +++ b/language/_____LANGUAGE_de/_____LANGUAGE_de.aod @@ -2693,13 +2693,17 @@ <entry> <key>Links</key> </entry> - <entry> - <key>Linktype</key> - </entry> <entry> <key>${PRODUCT_LIB_NO_PRODUCT_ID} function: %0</key> <value>Es wird der Funktion %0 keine Produktid übergeben.</value> </entry> + <entry> + <key>Object type</key> + <value>Typ</value> + </entry> + <entry> + <key>Level</key> + </entry> </keyValueMap> <font name="Dialog" style="0" size="11" /> </language> diff --git a/language/_____LANGUAGE_en/_____LANGUAGE_en.aod b/language/_____LANGUAGE_en/_____LANGUAGE_en.aod index 78ad4e2a7e8e0c3e9ed19221b5e2ebc4cfee6f1a..1e68696cfb16f1159c185d3d650cafaeb5e35c3f 100644 --- a/language/_____LANGUAGE_en/_____LANGUAGE_en.aod +++ b/language/_____LANGUAGE_en/_____LANGUAGE_en.aod @@ -2360,13 +2360,16 @@ <entry> <key>Links</key> </entry> - <entry> - <key>Linktype</key> - </entry> <entry> <key>${PRODUCT_LIB_NO_PRODUCT_ID} function: %0</key> <value>Missing productId in function %0.</value> </entry> + <entry> + <key>Object type</key> + </entry> + <entry> + <key>Level</key> + </entry> </keyValueMap> <font name="Dialog" style="0" size="11" /> </language> diff --git a/neonView/ActivityLinkFilter_view/ActivityLinkFilter_view.aod b/neonView/ActivityLinkFilter_view/ActivityLinkFilter_view.aod index 597ac9502a58f95a5c666e853338c7f276225c48..d7491b7ecf0d1e22859cd53718fcbc68c1b872bc 100644 --- a/neonView/ActivityLinkFilter_view/ActivityLinkFilter_view.aod +++ b/neonView/ActivityLinkFilter_view/ActivityLinkFilter_view.aod @@ -11,6 +11,7 @@ <children> <tableViewTemplate> <name>ActivityLinkFilter_template</name> + <autoNewRow v="true" /> <entityField>#ENTITY</entityField> <columns> <neonTableColumn> diff --git a/neonView/OfferMain_view/OfferMain_view.aod b/neonView/OfferMain_view/OfferMain_view.aod index 5b736ba58050f5d14a8e2640c98b9c9cd89f666b..01fc943f6aabc0eef9a44669332c76c760b0756c 100644 --- a/neonView/OfferMain_view/OfferMain_view.aod +++ b/neonView/OfferMain_view/OfferMain_view.aod @@ -14,6 +14,11 @@ <entityField>#ENTITY</entityField> <view>OfferPreview_view</view> </neonViewReference> + <neonViewReference> + <name>a3702740-418d-40d5-9415-788542c14abb</name> + <entityField>Activities</entityField> + <view>ActivityFilter_view</view> + </neonViewReference> <neonViewReference> <name>e6b12eed-d67e-467c-9302-f6340f901235</name> <entityField>#ENTITY</entityField> diff --git a/neonView/OrderMain_view/OrderMain_view.aod b/neonView/OrderMain_view/OrderMain_view.aod index e5d693958f3765bf175d06e20bd9ef119333a843..6e56315bc93cfc70218efb22ecd2447aa36024df 100644 --- a/neonView/OrderMain_view/OrderMain_view.aod +++ b/neonView/OrderMain_view/OrderMain_view.aod @@ -14,6 +14,11 @@ <entityField>#ENTITY</entityField> <view>OrderPreview_view</view> </neonViewReference> + <neonViewReference> + <name>7ec102f5-fb45-44a7-9bbf-0eba7f1536d7</name> + <entityField>Activities</entityField> + <view>ActivityFilter_view</view> + </neonViewReference> <neonViewReference> <name>f5455f3f-0743-47d1-bcb7-f2e83526e329</name> <entityField>Orderitems</entityField> diff --git a/neonView/ProductMain_view/ProductMain_view.aod b/neonView/ProductMain_view/ProductMain_view.aod index 3f6aabdbf743965da9ddabdb20a96ae73ccd2325..68c00aaceec3ba5a2590cb09dd787ce1f8aeddb4 100644 --- a/neonView/ProductMain_view/ProductMain_view.aod +++ b/neonView/ProductMain_view/ProductMain_view.aod @@ -14,6 +14,11 @@ <entityField>#ENTITY</entityField> <view>ProductPreview_view</view> </neonViewReference> + <neonViewReference> + <name>41887933-bb9a-48ce-818d-1db815021a36</name> + <entityField>Activities</entityField> + <view>ActivityFilter_view</view> + </neonViewReference> <neonViewReference> <name>51f37fe5-91e1-4b76-83b3-be0319e871a4</name> <entityField>#ENTITY</entityField> diff --git a/process/Context_lib/process.js b/process/Context_lib/process.js index 5965deeba144c239e66f8c9b39bb81849957cc2e..db0117bcd46b02c19229b2f367da8645e88f5ee7 100644 --- a/process/Context_lib/process.js +++ b/process/Context_lib/process.js @@ -105,15 +105,18 @@ ContextUtils._getSelectMap = function() { var maskingUtils = new SqlMaskingUtils(); return { - // contextId nameField Tablename, IDField, isSystemAlias - "Organisation": ["\"NAME\"", "ORGANISATION", "ORGANISATIONID", false], - "Person": [maskingUtils.concat(["FIRSTNAME", "LASTNAME"]), "PERSON", "PERSONID", false], - "Activity": ["SUBJECT", "ACTIVITY", "ACTIVITYID", false], - "Salesproject": [maskingUtils.concat([maskingUtils.cast("PROJECTCODE", SQLTYPES.VARCHAR, 10), "':'", "PROJECTTITLE"]), "SALESPROJECT", "SALESPROJECTID", false], + // contextId nameField Tablename, IDField + "Organisation": ["\"NAME\"", "ORGANISATION", "ORGANISATIONID"], + "Person": [maskingUtils.concat(["FIRSTNAME", "LASTNAME"]), "PERSON", "PERSONID"], + "Activity": ["SUBJECT", "ACTIVITY", "ACTIVITYID"], + "Salesproject": [maskingUtils.concat([maskingUtils.cast("PROJECTCODE", SQLTYPES.VARCHAR, 10), "':'", "PROJECTTITLE"]), "SALESPROJECT", "SALESPROJECTID"], // TODO: keywords sind noch nicht in der DB somit gibt es nichts ähnliches zu getKeySQL. // maskingUtils.concat([SqlMaskingUtils.cast("CONTRACTCODE", "varchar", 10), getKeySQL("CONTRACTTYPE", "CONTRACTTYPE" )]) - "Contract": [maskingUtils.cast("CONTRACTCODE", SQLTYPES.VARCHAR, 10), "CONTRACT", "CONTRACTID", false] -// "Appointment": ["SUMMARY", "ASYS_CALENDARBACKEND", "UID", true] + "Contract": [maskingUtils.cast("CONTRACTCODE", SQLTYPES.VARCHAR, 10), "CONTRACT", "CONTRACTID"], +// "Appointment": ["SUMMARY", "ASYS_CALENDARBACKEND", "UID"] + "Offer": [maskingUtils.cast("OFFERCODE", SQLTYPES.VARCHAR, 10), "OFFER", "OFFERID"], + "Order": [maskingUtils.cast("SALESORDERCODE", SQLTYPES.VARCHAR, 10), "SALESORDER", "SALESORDERID"], + "Product": ["PRODUCTNAME", "PRODUCT", "PRODUCTID"] } }