diff --git a/entity/Productprice_entity/Productprice_entity.aod b/entity/Productprice_entity/Productprice_entity.aod index 32ad155d4473c1621475321e718f8af1d08e71be..c75679705aabe4204eebe96948fae4b0e356a9dd 100644 --- a/entity/Productprice_entity/Productprice_entity.aod +++ b/entity/Productprice_entity/Productprice_entity.aod @@ -64,7 +64,6 @@ <mandatory v="true" /> <stateProcess>%aditoprj%/entity/Productprice_entity/entityfields/product_id/stateProcess.js</stateProcess> <valueProcess>%aditoprj%/entity/Productprice_entity/entityfields/product_id/valueProcess.js</valueProcess> - <displayValueProcess>%aditoprj%/entity/Productprice_entity/entityfields/product_id/displayValueProcess.js</displayValueProcess> </entityField> <entityField> <name>CONTACT_ID</name> @@ -324,6 +323,10 @@ <name>FROMQUANTITY.displayValue</name> <expression>%aditoprj%/entity/Productprice_entity/recordcontainers/db/recordfieldmappings/fromquantity.displayvalue/expression.js</expression> </dbRecordFieldMapping> + <dbRecordFieldMapping> + <name>PRODUCT_ID.displayValue</name> + <expression>%aditoprj%/entity/Productprice_entity/recordcontainers/db/recordfieldmappings/product_id.displayvalue/expression.js</expression> + </dbRecordFieldMapping> </recordFieldMappings> <linkInformation> <linkInformation> diff --git a/entity/Productprice_entity/entityfields/product_id/displayValueProcess.js b/entity/Productprice_entity/entityfields/product_id/displayValueProcess.js deleted file mode 100644 index 62dfdaf791091cabb2983bad7ed5f34dd09272ba..0000000000000000000000000000000000000000 --- a/entity/Productprice_entity/entityfields/product_id/displayValueProcess.js +++ /dev/null @@ -1,11 +0,0 @@ -import("system.neon"); -import("system.vars"); -import("system.result"); -import("system.db"); -import("Sql_lib"); - -// TODO: Wenn es möglich ist, den anzeigenamen des Produkts über die Entity beziehung zu laden, dann umbauen...!!! -result.string(newSelect("PRODUCTNAME") - .from("PRODUCT") - .whereIfSet("PRODUCT.PRODUCTID", "$field.PRODUCT_ID") - .cell(true)); \ No newline at end of file diff --git a/entity/Productprice_entity/recordcontainers/db/recordfieldmappings/product_id.displayvalue/expression.js b/entity/Productprice_entity/recordcontainers/db/recordfieldmappings/product_id.displayvalue/expression.js new file mode 100644 index 0000000000000000000000000000000000000000..cbc5d9d359d33fe622b4e9052b1038a67111ffdb --- /dev/null +++ b/entity/Productprice_entity/recordcontainers/db/recordfieldmappings/product_id.displayvalue/expression.js @@ -0,0 +1,4 @@ +import("system.result"); + +result.string("select PRODUCTNAME from PRODUCT \n\ + where PRODUCT.PRODUCTID = PRODUCTPRICE.PRODUCT_ID"); \ No newline at end of file