From da740e5548140729c46c7c57e3a326d1e5d83e10 Mon Sep 17 00:00:00 2001 From: "b.ulrich" <b.ulrich@adito.de> Date: Tue, 9 Mar 2021 07:36:33 +0100 Subject: [PATCH] =?UTF-8?q?[Projekt:=20xRM-Sales][TicketNr.:=201073510][Ve?= =?UTF-8?q?rtriebsprozesse=20-=20=C3=9Cberarbeitung:=20Code=20refactoring]?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../children/setcompleted/onActionProcess.js | 24 +++---------------- 1 file changed, 3 insertions(+), 21 deletions(-) diff --git a/entity/ChecklistEntryValue_entity/entityfields/setchecklistentrycompleted/children/setcompleted/onActionProcess.js b/entity/ChecklistEntryValue_entity/entityfields/setchecklistentrycompleted/children/setcompleted/onActionProcess.js index e1f74869bb..80020200dc 100644 --- a/entity/ChecklistEntryValue_entity/entityfields/setchecklistentrycompleted/children/setcompleted/onActionProcess.js +++ b/entity/ChecklistEntryValue_entity/entityfields/setchecklistentrycompleted/children/setcompleted/onActionProcess.js @@ -1,26 +1,8 @@ -import("system.entities"); import("system.vars"); import("system.neon"); import("Sql_lib"); -var loadConfig = entities.createConfigForLoadingRows() - .entity("ChecklistEntryValue_entity") - .fields(["CHECKLISTENTRYVALUEID"]) - .addParameter("ObjectRowId_param", vars.get("$param.ObjectRowId_param")) - .addParameter("ChecklistEntryValueId_param", vars.get("$field.CHECKLISTENTRYVALUEID")) - .addParameter("ChecklistId_param", vars.get("$param.ChecklistId_param")); - -var checklistEntryValueIds = entities.getRows(loadConfig); - -var updateConfig = entities.createConfigForUpdatingRows() - .entity("ChecklistEntryValue_entity") - .fieldValues({"IS_FULFILLED": 1}) - .uid(checklistEntryValueIds[0]["CHECKLISTENTRYVALUEID"]) - .addParameter("ObjectRowId_param", vars.get("$param.ObjectRowId_param")) - .addParameter("ChecklistEntryValueId_param", vars.get("$field.CHECKLISTENTRYVALUEID")) - .addParameter("ChecklistId_param", vars.get("$param.ChecklistId_param")) - .ignorePermissions(true); - -entities.updateRow(updateConfig); - +newWhere("CHECKLISTENTRYVALUE.CHECKLISTENTRYVALUEID", "$field.CHECKLISTENTRYVALUEID") + .updateFields({"IS_FULFILLED":1}); + neon.refresh(); \ No newline at end of file -- GitLab