From b60aaf7d349ced70b5228e48b012652f7d1fff7d Mon Sep 17 00:00:00 2001 From: Markus Escher <m.escher@adito.de> Date: Tue, 15 Jan 2019 10:43:07 +0100 Subject: [PATCH] #1030775 add Salesproject to OrgMainView --- entity/Org_entity/Org_entity.aod | 16 ++++++++++++++++ .../children/relationid_param/code.js | 3 +++ .../Salesproject_entity.aod | 19 +++++++++++++++++++ .../recordcontainers/db/conditionProcess.js | 9 +++++++++ neonView/OrgMain_view/OrgMain_view.aod | 5 +++++ 5 files changed, 52 insertions(+) create mode 100644 entity/Org_entity/entityfields/orgsalesproject_dfo/children/relationid_param/code.js create mode 100644 entity/Salesproject_entity/recordcontainers/db/conditionProcess.js diff --git a/entity/Org_entity/Org_entity.aod b/entity/Org_entity/Org_entity.aod index 06e172f4e41..3e1c3696cf3 100644 --- a/entity/Org_entity/Org_entity.aod +++ b/entity/Org_entity/Org_entity.aod @@ -444,6 +444,22 @@ <onActionProcess>%aditoprj%/entity/Org_entity/entityfields/newactivity/onActionProcess.js</onActionProcess> <iconId>NEON:HISTORY</iconId> </entityActionField> + <entityOutgoingField> + <name>OrgSalesproject_dfo</name> + <title>Salesprojects</title> + <fieldType>DEPENDENCY_OUT</fieldType> + <dependency> + <name>dependency</name> + <entityName>Salesproject_entity</entityName> + <fieldName>SalesprojectOrg_dfi</fieldName> + </dependency> + <children> + <entityParameter> + <name>relationId_param</name> + <code>%aditoprj%/entity/Org_entity/entityfields/orgsalesproject_dfo/children/relationid_param/code.js</code> + </entityParameter> + </children> + </entityOutgoingField> </entityFields> <recordContainers> <dbRecordContainer> diff --git a/entity/Org_entity/entityfields/orgsalesproject_dfo/children/relationid_param/code.js b/entity/Org_entity/entityfields/orgsalesproject_dfo/children/relationid_param/code.js new file mode 100644 index 00000000000..f001bb14e2e --- /dev/null +++ b/entity/Org_entity/entityfields/orgsalesproject_dfo/children/relationid_param/code.js @@ -0,0 +1,3 @@ +import("system.vars"); +import("system.result"); +result.string(vars.get("$field.RELATIONID")); \ No newline at end of file diff --git a/entity/Salesproject_entity/Salesproject_entity.aod b/entity/Salesproject_entity/Salesproject_entity.aod index a1b7a10089a..424098cced5 100644 --- a/entity/Salesproject_entity/Salesproject_entity.aod +++ b/entity/Salesproject_entity/Salesproject_entity.aod @@ -316,12 +316,31 @@ </entityParameter> </children> </entityOutgoingField> + <entityIncomingField> + <name>SalesprojectOrg_dfi</name> + <fieldType>DEPENDENCY_IN</fieldType> + <recordContainer>db</recordContainer> + <dependencies> + <entityDependency> + <name>5f8500a6-ec3c-4792-ac6d-4bf2a39b89f2</name> + <entityName>Org_entity</entityName> + <fieldName>OrgSalesproject_dfo</fieldName> + <isOutgoing v="false" /> + </entityDependency> + </dependencies> + </entityIncomingField> + <entityParameter> + <name>relationId_param</name> + <expose v="true" /> + <description>PARAMETER</description> + </entityParameter> </entityFields> <recordContainers> <dbRecordContainer> <name>db</name> <alias>Data_alias</alias> <fromClauseProcess>%aditoprj%/entity/Salesproject_entity/recordcontainers/db/fromClauseProcess.js</fromClauseProcess> + <conditionProcess>%aditoprj%/entity/Salesproject_entity/recordcontainers/db/conditionProcess.js</conditionProcess> <onDBInsert>%aditoprj%/entity/Salesproject_entity/recordcontainers/db/onDBInsert.js</onDBInsert> <onDBUpdate>%aditoprj%/entity/Salesproject_entity/recordcontainers/db/onDBUpdate.js</onDBUpdate> <linkInformation> diff --git a/entity/Salesproject_entity/recordcontainers/db/conditionProcess.js b/entity/Salesproject_entity/recordcontainers/db/conditionProcess.js new file mode 100644 index 00000000000..8602cf6a01c --- /dev/null +++ b/entity/Salesproject_entity/recordcontainers/db/conditionProcess.js @@ -0,0 +1,9 @@ +import("system.db"); +import("system.result"); +import("system.vars"); +import("Sql_lib"); + +result.string(db.translateCondition( + SqlCondition.begin() + .andPrepareVars("SALESPROJECT.RELATION_ID", "$param.relationId_param") + .build("1 = 1"))); \ No newline at end of file diff --git a/neonView/OrgMain_view/OrgMain_view.aod b/neonView/OrgMain_view/OrgMain_view.aod index 4c801b173f0..02ca329f28d 100644 --- a/neonView/OrgMain_view/OrgMain_view.aod +++ b/neonView/OrgMain_view/OrgMain_view.aod @@ -40,5 +40,10 @@ <entityField>OrgContract_dfo</entityField> <view>ContractFilter_view</view> </neonViewReference> + <neonViewReference> + <name>748d46a2-96ba-4f47-bf18-1f3b2fd9d708</name> + <entityField>OrgSalesproject_dfo</entityField> + <view>SalesprojectFilter_view</view> + </neonViewReference> </children> </neonView> -- GitLab