diff --git a/entity/Prod2prod_entity/Prod2prod_entity.aod b/entity/Prod2prod_entity/Prod2prod_entity.aod index fc76ea57a433be7662a5a996ce82744e07429b12..b4721e7460ed28ff920e35a593a533563dcd6132 100644 --- a/entity/Prod2prod_entity/Prod2prod_entity.aod +++ b/entity/Prod2prod_entity/Prod2prod_entity.aod @@ -130,6 +130,7 @@ <jDitoRecordAlias>Data_alias</jDitoRecordAlias> <contentProcess>%aditoprj%/entity/Prod2prod_entity/recordcontainers/jdito/contentProcess.js</contentProcess> <onInsert>%aditoprj%/entity/Prod2prod_entity/recordcontainers/jdito/onInsert.js</onInsert> + <onUpdate>%aditoprj%/entity/Prod2prod_entity/recordcontainers/jdito/onUpdate.js</onUpdate> <onDelete>%aditoprj%/entity/Prod2prod_entity/recordcontainers/jdito/onDelete.js</onDelete> <recordFieldMappings> <jDitoRecordFieldMapping> diff --git a/entity/Prod2prod_entity/recordcontainers/jdito/onUpdate.js b/entity/Prod2prod_entity/recordcontainers/jdito/onUpdate.js new file mode 100644 index 0000000000000000000000000000000000000000..0dff9d0fdd1ee895b0c9a497806550dfa376e6c8 --- /dev/null +++ b/entity/Prod2prod_entity/recordcontainers/jdito/onUpdate.js @@ -0,0 +1,15 @@ +import("system.datetime"); +import("system.vars"); +import("system.db"); + +var cols = [ "SOURCE_ID" + , "QUANTITY" + , "OPTIONAL" + , "TAKEPRICE" ]; + +var vals = [ vars.get("$field.SOURCE_ID") + , vars.get("$field.QUANTITY") + , vars.get("$field.OPTIONAL") + , vars.get("$field.TAKEPRICE") ]; + +db.updateData("PROD2PROD", cols, null, vals, "PROD2PRODID = '" + vars.get("$field.PROD2PRODID") + "'"); \ No newline at end of file