Skip to content
Snippets Groups Projects
Commit e382b60e authored by Markus Escher's avatar Markus Escher
Browse files

fix lookup for Order

parent 9cd44024
No related branches found
No related tags found
No related merge requests found
...@@ -57,6 +57,7 @@ ...@@ -57,6 +57,7 @@
<linkedContextProcess>%aditoprj%/entity/Order_entity/entityfields/relation_id/linkedContextProcess.js</linkedContextProcess> <linkedContextProcess>%aditoprj%/entity/Order_entity/entityfields/relation_id/linkedContextProcess.js</linkedContextProcess>
<mandatory v="true" /> <mandatory v="true" />
<outgoingField>OrderRelation_dfo</outgoingField> <outgoingField>OrderRelation_dfo</outgoingField>
<displayValueProcess>%aditoprj%/entity/Order_entity/entityfields/relation_id/displayValueProcess.js</displayValueProcess>
<onValueChange>%aditoprj%/entity/Order_entity/entityfields/relation_id/onValueChange.js</onValueChange> <onValueChange>%aditoprj%/entity/Order_entity/entityfields/relation_id/onValueChange.js</onValueChange>
<onValueChangeTypes> <onValueChangeTypes>
<element>MASK</element> <element>MASK</element>
...@@ -65,10 +66,11 @@ ...@@ -65,10 +66,11 @@
<entityField> <entityField>
<name>SALESPROJECT_ID</name> <name>SALESPROJECT_ID</name>
<title>Salesproject</title> <title>Salesproject</title>
<linkedContext>Salesproject_context</linkedContext>
<mandatory v="true" /> <mandatory v="true" />
<state>INVISIBLE</state> <state>INVISIBLE</state>
<stateProcess>%aditoprj%/entity/Order_entity/entityfields/salesproject_id/stateProcess.js</stateProcess> <stateProcess>%aditoprj%/entity/Order_entity/entityfields/salesproject_id/stateProcess.js</stateProcess>
<valueProcess></valueProcess> <displayValueProcess>%aditoprj%/entity/Order_entity/entityfields/salesproject_id/displayValueProcess.js</displayValueProcess>
</entityField> </entityField>
<entityField> <entityField>
<name>STATUS</name> <name>STATUS</name>
...@@ -301,19 +303,33 @@ ...@@ -301,19 +303,33 @@
<onDBDelete>%aditoprj%/entity/Order_entity/recordcontainers/db/onDBDelete.js</onDBDelete> <onDBDelete>%aditoprj%/entity/Order_entity/recordcontainers/db/onDBDelete.js</onDBDelete>
<linkInformation> <linkInformation>
<linkInformation> <linkInformation>
<name>ab8d856d-4776-4373-b675-37a1a672a7a6</name> <name>f84d86a8-867d-44ea-bce5-3489bbee55a0</name>
<tableName>SALESORDER</tableName> <tableName>SALESORDER</tableName>
<primaryKey>SALESORDERID</primaryKey> <primaryKey>SALESORDERID</primaryKey>
<isUIDTable v="true" /> <isUIDTable v="true" />
<readonly v="false" /> <readonly v="false" />
</linkInformation> </linkInformation>
<linkInformation> <linkInformation>
<name>0580b93e-94bf-4a52-a4c0-3746733e559c</name> <name>2c489a72-00ee-4bad-929f-25ef82dbc714</name>
<tableName>RELATION</tableName> <tableName>RELATION</tableName>
<primaryKey>RELATIONID</primaryKey> <primaryKey>RELATIONID</primaryKey>
<isUIDTable v="false" /> <isUIDTable v="false" />
<readonly v="true" /> <readonly v="true" />
</linkInformation> </linkInformation>
<linkInformation>
<name>3888fb8c-6d2a-42e6-8abd-e4a9ac7a74ac</name>
<tableName>ORG</tableName>
<primaryKey>ORGID</primaryKey>
<isUIDTable v="false" />
<readonly v="true" />
</linkInformation>
<linkInformation>
<name>75470798-2097-41a2-95c2-22cf80d2f0c4</name>
<tableName>PERS</tableName>
<primaryKey>PERSID</primaryKey>
<isUIDTable v="false" />
<readonly v="true" />
</linkInformation>
</linkInformation> </linkInformation>
<recordFieldMappings> <recordFieldMappings>
<dbRecordFieldMapping> <dbRecordFieldMapping>
...@@ -384,10 +400,6 @@ ...@@ -384,10 +400,6 @@
<name>RELATION_ID.value</name> <name>RELATION_ID.value</name>
<recordfield>SALESORDER.RELATION_ID</recordfield> <recordfield>SALESORDER.RELATION_ID</recordfield>
</dbRecordFieldMapping> </dbRecordFieldMapping>
<dbRecordFieldMapping>
<name>RELATION_ID.displayValue</name>
<recordfield>RELATION.RELATIONID</recordfield>
</dbRecordFieldMapping>
<dbRecordFieldMapping> <dbRecordFieldMapping>
<name>RELATION_ORG_ID.value</name> <name>RELATION_ORG_ID.value</name>
<recordfield>RELATION.ORG_ID</recordfield> <recordfield>RELATION.ORG_ID</recordfield>
......
import("system.result");
import("system.vars");
import("Relation_lib");
import("system.neon");
result.string(RelationUtils.getNameByPersOrgWithRelationId(vars.getString("$field.RELATION_ID")));
\ No newline at end of file
import("system.result");
import("system.vars"); import("system.vars");
import("Relation_lib") import("system.result");
import("Relation_lib");
if(!vars.get("$field.RELATION_PERS_ID") && !vars.get("$field.RELATION_ORG_ID")) result.string(RelationUtils.getContextByRelationId(vars.getString("$field.RELATION_ID")));
result.string(""); \ No newline at end of file
else {
switch (RelationUtils.getRelationTypeByPersOrg(vars.get("$field.RELATION_PERS_ID"), vars.get("$field.RELATION_ORG_ID")))
{
case 1: // Org
result.string("Org_context")
break;
case 2: // private Pers
case 3: // Pers
result.string("Pers_context")
default:
}
}
\ No newline at end of file
import("system.vars");
import("system.result");
import("Salesproject_lib");
result.string(Salesproject.getSalesProjectTitleById(vars.getString("$field.SALESPROJECT_ID")));
\ No newline at end of file
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