diff --git a/entity/ChecklistEntryValue_entity/entityfields/setchecklistentrycompleted/children/setcompleted/onActionProcess.js b/entity/ChecklistEntryValue_entity/entityfields/setchecklistentrycompleted/children/setcompleted/onActionProcess.js index e1f74869bb3695fad698f4dd4a1180674700ffa3..80020200dc6b4dbf08aa00f5c0699d6db47d79e0 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