Skip to content
Snippets Groups Projects
Commit 0f78cfcd authored by Johannes Goderbauer's avatar Johannes Goderbauer
Browse files

contact: extend "new contact"-action

parent ba548edb
No related branches found
No related tags found
No related merge requests found
Showing with 82 additions and 35 deletions
......@@ -79,12 +79,6 @@
<fieldName>Addresses</fieldName>
<isConsumer v="false" />
</entityDependency>
<entityDependency>
<name>f6e4be75-2810-4c39-86c7-710f1b72b172</name>
<entityName>Contact_entity</entityName>
<fieldName>Addresses</fieldName>
<isConsumer v="false" />
</entityDependency>
</dependencies>
<children>
<entityParameter>
......@@ -123,6 +117,12 @@
<fieldName>PersAddresses</fieldName>
<isConsumer v="false" />
</entityDependency>
<entityDependency>
<name>aecd30a8-b80e-42c5-be09-3042b75a3fa2</name>
<entityName>Contact_entity</entityName>
<fieldName>ContactAddresses</fieldName>
<isConsumer v="false" />
</entityDependency>
</dependencies>
<children>
<entityParameter>
......
......@@ -73,6 +73,12 @@ Usually this is used for filtering COMMUNICATION-entries by a specified contact
<fieldName>Communications</fieldName>
<isConsumer v="false" />
</entityDependency>
<entityDependency>
<name>a22c32e2-6d76-4e79-8c71-251ee381b22e</name>
<entityName>Contact_entity</entityName>
<fieldName>Communications</fieldName>
<isConsumer v="false" />
</entityDependency>
</dependencies>
<children>
<entityParameter>
......
......@@ -60,30 +60,59 @@
<entityField>
<name>ADDRESS_ID</name>
<title>standard address</title>
<consumer>Addresses</consumer>
</entityField>
<entityField>
<name>PERSON_TITLE</name>
<title>Person</title>
<state>READONLY</state>
<valueProcess>%aditoprj%/entity/Contact_entity/entityfields/person_title/valueProcess.js</valueProcess>
</entityField>
<entityConsumer>
<name>Addresses</name>
<name>Communications</name>
<title>Communication</title>
<fieldType>DEPENDENCY_OUT</fieldType>
<dependency>
<name>dependency</name>
<entityName>Communication_entity</entityName>
<fieldName>AllCommunications</fieldName>
</dependency>
<children>
<entityParameter>
<name>ContactId_param</name>
<valueProcess>%aditoprj%/entity/Contact_entity/entityfields/communications/children/contactid_param/valueProcess.js</valueProcess>
</entityParameter>
</children>
</entityConsumer>
<entityConsumer>
<name>ContactAddresses</name>
<title>Addresses</title>
<fieldType>DEPENDENCY_OUT</fieldType>
<dependency>
<name>dependency</name>
<entityName>Address_entity</entityName>
<fieldName>OrganisationAddresses</fieldName>
<fieldName>ContactAddresses</fieldName>
</dependency>
<children>
<entityParameter>
<name>ContactId_param</name>
<valueProcess>%aditoprj%/entity/Contact_entity/entityfields/addresses/children/contactid_param/valueProcess.js</valueProcess>
<triggerRecalculation v="true" />
<valueProcess>%aditoprj%/entity/Contact_entity/entityfields/contactaddresses/children/contactid_param/valueProcess.js</valueProcess>
</entityParameter>
</children>
</entityConsumer>
<entityField>
<name>PERSON_TITLE</name>
<title>Person</title>
<state>READONLY</state>
<valueProcess>%aditoprj%/entity/Contact_entity/entityfields/person_title/valueProcess.js</valueProcess>
<name>LANGUAGE</name>
<title>Language</title>
<consumer>Languages</consumer>
</entityField>
<entityConsumer>
<name>Languages</name>
<fieldType>DEPENDENCY_OUT</fieldType>
<dependency>
<name>dependency</name>
<entityName>Language_entity</entityName>
<fieldName>ISO3Name</fieldName>
</dependency>
</entityConsumer>
</entityFields>
<recordContainers>
<dbRecordContainer>
......@@ -127,6 +156,10 @@
<name>ADDRESS_ID.value</name>
<recordfield>CONTACT.ADDRESS_ID</recordfield>
</dbRecordFieldMapping>
<dbRecordFieldMapping>
<name>LANGUAGE.value</name>
<recordfield>CONTACT.LANGUAGE</recordfield>
</dbRecordFieldMapping>
</recordFieldMappings>
</dbRecordContainer>
</recordContainers>
......
import("system.result");
import("system.db");
import("system.vars");
import("Sql_lib");
var orgId = vars.get("$field.ORGANISATION_ID");
if (orgId)
{
var orgContactId = db.cell(SqlCondition.begin()
.andPrepare("CONTACT.ORGANISATION_ID", orgId)
.and("CONTACT.PERSON_ID is null")
.buildSql("select CONTACT.CONTACTID from CONTACT"));
result.string(orgContactId);
}
\ No newline at end of file
import("system.vars");
import("system.result");
result.string(vars.get("$field.CONTACTID"));
\ No newline at end of file
import("system.vars");
import("system.result");
result.string(vars.get("$field.CONTACTID"));
\ No newline at end of file
......@@ -62,6 +62,12 @@
<fieldName>Languages</fieldName>
<isConsumer v="false" />
</entityDependency>
<entityDependency>
<name>030ac1ae-5f5b-4815-b9f4-1121b7c881ad</name>
<entityName>Contact_entity</entityName>
<fieldName>Languages</fieldName>
<isConsumer v="false" />
</entityDependency>
</dependencies>
</entityProvider>
</entityFields>
......
......@@ -21,10 +21,6 @@
<name>40d2367e-c197-424c-8442-9b04c7369e3a</name>
<entityField>ORGANISATION_ID</entityField>
</entityFieldLink>
<entityFieldLink>
<name>e6db316a-cc0b-47b7-9773-1ae72a57ff14</name>
<entityField>ADDRESS_ID</entityField>
</entityFieldLink>
<entityFieldLink>
<name>847e9231-d6df-4ead-903d-b70dbcd69333</name>
<entityField>DEPARTMENT</entityField>
......@@ -37,7 +33,21 @@
<name>e7c57e62-ff21-4ccd-8458-55d2fcca7b97</name>
<entityField>POSITION</entityField>
</entityFieldLink>
<entityFieldLink>
<name>3028e060-b360-4584-96e6-4cf17ef94b07</name>
<entityField>LANGUAGE</entityField>
</entityFieldLink>
</fields>
</genericViewTemplate>
<neonViewReference>
<name>2912698f-2123-4c4f-b277-b7aa16b1c5e0</name>
<entityField>Communications</entityField>
<view>CommunicationMultiEdit_view</view>
</neonViewReference>
<neonViewReference>
<name>3e90f469-405f-46e4-9fed-ce017dc0c222</name>
<entityField>ContactAddresses</entityField>
<view>AdressMultiEdit_view</view>
</neonViewReference>
</children>
</neonView>
......@@ -44,7 +44,7 @@
</genericViewTemplate>
<neonViewReference>
<name>148e3a6c-d30b-470c-84e5-273293348611</name>
<entityField>Addresses</entityField>
<entityField>OrganisationAddresses</entityField>
<view>AdressMultiEdit_view</view>
</neonViewReference>
<neonViewReference>
......
......@@ -23,7 +23,7 @@
</neonViewReference>
<neonViewReference>
<name>df605bb6-5d18-4233-abc0-1da82e4910ca</name>
<entityField>Addresses</entityField>
<entityField>OrganisationAddresses</entityField>
<view>AddressList_view</view>
</neonViewReference>
<genericViewTemplate>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment