Skip to content
Snippets Groups Projects
Commit a88ceaa0 authored by Sebastian Listl's avatar Sebastian Listl :speech_balloon:
Browse files

Merge branch '1067033_FixProductOnDelete' into '2020.2'

[Projekt: Entwicklung - Neon][TicketNr.: 1067033][[PRODUCT] Löschen nicht möglich]

See merge request xrm/basic!457
parents 9e0c3684 0c5cee0e
No related branches found
No related tags found
No related merge requests found
......@@ -13,6 +13,7 @@
<useFavorites v="true" />
<iconId>VAADIN:HAMMER</iconId>
<imageProcess>%aditoprj%/entity/Product_entity/imageProcess.js</imageProcess>
<usePermissions v="true" />
<titlePlural>Products</titlePlural>
<recordContainer>db</recordContainer>
<entityFields>
......
import("system.vars");
import("Workflow_lib");
import("Context_lib");
import("Sql_lib");
import("Attribute_lib");
newWhereIfSet("PROD2PROD.DEST_ID", "$field.PRODUCTID")
var productId = vars.get("$local.uid");
newWhereIfSet("PROD2PROD.DEST_ID", productId)
.deleteData();
newWhereIfSet("PROD2PROD.SOURCE_ID", "$field.PRODUCTID")
newWhereIfSet("PROD2PROD.SOURCE_ID", productId)
.deleteData();
newWhereIfSet("PRODUCTPRICE.PRODUCT_ID", "$field.PRODUCTID")
newWhereIfSet("PRODUCTPRICE.PRODUCT_ID", productId)
.deleteData();
newWhereIfSet("STOCK.PRODUCT_ID", "$field.PRODUCTID")
newWhereIfSet("STOCK.PRODUCT_ID", productId)
.deleteData();
new AttributeRelationQuery(productId, null, ContextUtils.getCurrentContextId())
......
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