Skip to content
Snippets Groups Projects
Commit 61fa2c3f authored by Johannes Hörmann's avatar Johannes Hörmann
Browse files

refactorings & todo refactorings

parent 14d0cbef
No related branches found
No related tags found
No related merge requests found
Showing
with 33 additions and 24 deletions
...@@ -62,7 +62,8 @@ ...@@ -62,7 +62,8 @@
<name>PRODUCT_ID</name> <name>PRODUCT_ID</name>
<documentation>%aditoprj%/entity/Orderitem_entity/entityfields/product_id/documentation.adoc</documentation> <documentation>%aditoprj%/entity/Orderitem_entity/entityfields/product_id/documentation.adoc</documentation>
<title>Article</title> <title>Article</title>
<possibleItemsProcess>%aditoprj%/entity/Orderitem_entity/entityfields/product_id/possibleItemsProcess.js</possibleItemsProcess> <consumer>Products</consumer>
<linkedContext>Product_context</linkedContext>
<onValueChange>%aditoprj%/entity/Orderitem_entity/entityfields/product_id/onValueChange.js</onValueChange> <onValueChange>%aditoprj%/entity/Orderitem_entity/entityfields/product_id/onValueChange.js</onValueChange>
<onValueChangeTypes> <onValueChangeTypes>
<element>MASK</element> <element>MASK</element>
...@@ -182,6 +183,15 @@ ...@@ -182,6 +183,15 @@
</entityParameter> </entityParameter>
</children> </children>
</entityConsumer> </entityConsumer>
<entityConsumer>
<name>Products</name>
<fieldType>DEPENDENCY_OUT</fieldType>
<dependency>
<name>dependency</name>
<entityName>Product_entity</entityName>
<fieldName>#PROVIDER</fieldName>
</dependency>
</entityConsumer>
</entityFields> </entityFields>
<recordContainers> <recordContainers>
<dbRecordContainer> <dbRecordContainer>
...@@ -271,6 +281,10 @@ ...@@ -271,6 +281,10 @@
<name>UNIT.displayValue</name> <name>UNIT.displayValue</name>
<expression>%aditoprj%/entity/Orderitem_entity/recordcontainers/db/recordfieldmappings/unit.displayvalue/expression.js</expression> <expression>%aditoprj%/entity/Orderitem_entity/recordcontainers/db/recordfieldmappings/unit.displayvalue/expression.js</expression>
</dbRecordFieldMapping> </dbRecordFieldMapping>
<dbRecordFieldMapping>
<name>PRODUCT_ID.displayValue</name>
<expression>%aditoprj%/entity/Orderitem_entity/recordcontainers/db/recordfieldmappings/product_id.displayvalue/expression.js</expression>
</dbRecordFieldMapping>
</recordFieldMappings> </recordFieldMappings>
</dbRecordContainer> </dbRecordContainer>
</recordContainers> </recordContainers>
......
import("system.result");
import("system.db");
import("Sql_lib");
//TODO: change field to lookup field
var sqlUtils = new SqlMaskingUtils();
var prodsSql = "select PRODUCTID, " + sqlUtils.concat(["PRODUCTCODE", "PRODUCTNAME"], "/")
+ " from PRODUCT";
var prods = db.table(prodsSql);
var retArray = [];
for(var i = 0; i < prods.length; i++)
retArray.push(prods[i]);
result.object(retArray);
\ No newline at end of file
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
import("Entity_lib"); import("Entity_lib");
// TODO: also there is currently no good way to do updates with fields not connected to the record container. Workaround: imagevariable and update in onDBUpdate Process // TODO: also there is currently no good way to do updates with fields not connected to the record container. Workaround: imagevariable and update in onDBUpdate Process #1030023
FieldChanges.setChange("$field.IMAGE"); FieldChanges.setChange("$field.IMAGE");
\ No newline at end of file
import("Entity_lib"); import("Entity_lib");
// TODO: also there is currently no good way to do updates with fields not connected to the record container. Workaround: imagevariable and update in onDBUpdate Process // TODO: also there is currently no good way to do updates with fields not connected to the record container. Workaround: imagevariable and update in onDBUpdate Process #1030023
FieldChanges.setChange("$field.STANDARD_EMAIL_COMMUNICATION"); FieldChanges.setChange("$field.STANDARD_EMAIL_COMMUNICATION");
\ No newline at end of file
import("Entity_lib"); import("Entity_lib");
// TODO: also there is currently no good way to do updates with fields not connected to the record container. Workaround: imagevariable and update in onDBUpdate Process // TODO: also there is currently no good way to do updates with fields not connected to the record container. Workaround: imagevariable and update in onDBUpdate Process #1030023
FieldChanges.setChange("$field.STANDARD_PHONE_COMMUNICATION"); FieldChanges.setChange("$field.STANDARD_PHONE_COMMUNICATION");
\ No newline at end of file
...@@ -3,7 +3,7 @@ import("Person_lib"); ...@@ -3,7 +3,7 @@ import("Person_lib");
import("Communication_lib"); import("Communication_lib");
import("Entity_lib"); import("Entity_lib");
// TODO: this is a workaround for missing possibility to react on changes of fields not connected to record Contqainer // TODO: this is a workaround for missing possibility to react on changes of fields not connected to record Contqainer #1030023
FieldChanges.assimilateChangeAndDispose("$field.IMAGE", function(state, value){ FieldChanges.assimilateChangeAndDispose("$field.IMAGE", function(state, value){
if (state == FieldChanges.STATE_CHANGED()) if (state == FieldChanges.STATE_CHANGED())
PersUtils.setImage(vars.get("$field.PERSONID"), value); PersUtils.setImage(vars.get("$field.PERSONID"), value);
......
...@@ -153,6 +153,12 @@ ...@@ -153,6 +153,12 @@
<fieldName>Products</fieldName> <fieldName>Products</fieldName>
<isConsumer v="false" /> <isConsumer v="false" />
</entityDependency> </entityDependency>
<entityDependency>
<name>e4ba4c26-a777-4560-ab68-311ffae76e2f</name>
<entityName>Orderitem_entity</entityName>
<fieldName>Products</fieldName>
<isConsumer v="false" />
</entityDependency>
</dependencies> </dependencies>
</entityProvider> </entityProvider>
<entityConsumer> <entityConsumer>
......
import("system.vars"); import("system.vars");
import("Entity_lib"); import("Entity_lib");
// TODO: also there is currently no good way to do updates with fields not connected to the record container. Workaround: imagevariable and update in onDBUpdate Process // TODO: also there is currently no good way to do updates with fields not connected to the record container. Workaround: imagevariable and update in onDBUpdate Process #1030023
FieldChanges.setChange("$field.IMAGE"); FieldChanges.setChange("$field.IMAGE");
\ No newline at end of file
...@@ -2,7 +2,7 @@ import("system.vars"); ...@@ -2,7 +2,7 @@ import("system.vars");
import("Product_lib"); import("Product_lib");
import("Entity_lib"); import("Entity_lib");
// TODO: this is a workaround for missing possibility to react on changes of fields not connected to record Contqainer // TODO: this is a workaround for missing possibility to react on changes of fields not connected to record Contqainer #1030023
FieldChanges.assimilateChangeAndDispose("$field.IMAGE", function(state, value){ FieldChanges.assimilateChangeAndDispose("$field.IMAGE", function(state, value){
if (state == FieldChanges.STATE_CHANGED()) if (state == FieldChanges.STATE_CHANGED())
ProductUtils.setImage(vars.get("$field.PRODUCTID"), value); ProductUtils.setImage(vars.get("$field.PRODUCTID"), value);
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
<preferences xmlns="http://www.adito.de/2018/ao/Model" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" VERSION="3.0.3" xsi:schemaLocation="http://www.adito.de/2018/ao/Model adito://models/xsd/preferences/3.0.3"> <preferences xmlns="http://www.adito.de/2018/ao/Model" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" VERSION="3.0.3" xsi:schemaLocation="http://www.adito.de/2018/ao/Model adito://models/xsd/preferences/3.0.3">
<name>_____PREFERENCES_PROJECT</name> <name>_____PREFERENCES_PROJECT</name>
<majorModelMode>DISTRIBUTED</majorModelMode> <majorModelMode>DISTRIBUTED</majorModelMode>
<projectName>xRM-Basic5</projectName> <projectName>xRM-Basic2019</projectName>
<jditoMaxContentSize v="57671680" /> <jditoMaxContentSize v="57671680" />
<calendarCategoriesEvent> <calendarCategoriesEvent>
<entry> <entry>
......
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