Skip to content
Snippets Groups Projects
Commit da740e55 authored by Benjamin Ulrich's avatar Benjamin Ulrich :speech_balloon:
Browse files

[Projekt: xRM-Sales][TicketNr.: 1073510][Vertriebsprozesse - Überarbeitung: Code refactoring]

parent 073b7b1c
No related branches found
No related tags found
No related merge requests found
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
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