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

[Projekt: xRM-Sales][TicketNr.: 1084745][Inkonsistente Anlage von...

[Projekt: xRM-Sales][TicketNr.: 1084745][Inkonsistente Anlage von SALESPROJECT_MILESTONE-Datensätzen]
parent 2044e719
No related branches found
No related tags found
No related merge requests found
import("system.datetime");
import("Workflow_lib");
import("Context_lib");
import("system.neon");
......@@ -22,6 +23,7 @@ vars.get("$local.changed").forEach(function(fieldName) {
switch (fieldName) {
case "SALESPROJECT.PHASE":
typeValue = "SalesprojectPhase";
break;
case "SALESPROJECT.STATUS":
// Milestone
......@@ -97,6 +99,16 @@ vars.get("$local.changed").forEach(function(fieldName) {
}
});
if(rowdata["SALESPROJECT.STATUS"] == $KeywordRegistry.salesprojectState$aborted()
|| rowdata["SALESPROJECT.STATUS"] == $KeywordRegistry.salesprojectState$partialOrder()
|| rowdata["SALESPROJECT.STATUS"] == $KeywordRegistry.salesprojectState$order()
|| rowdata["SALESPROJECT.STATUS"] == $KeywordRegistry.salesprojectState$lost())
{
newWhere("SALESPROJECT_MILESTONE.SALESPROJECT_ID", "$local.uid")
.and("SALESPROJECT_MILESTONE.DATE_END is null")
.and("SALESPROJECT_MILESTONE.KIND", "SalesprojectPhase").updateData(true, "SALESPROJECT_MILESTONE", ["DATE_END"], null, [datetime.date()]);
}
var [serviceUrl, channelId] = newSelect(["SERVICE_URL", "GENERAL_CHANNELID"])
.from("MST_TEAM")
.where("MST_TEAM.MST_TEAMID", "$field.MST_TEAM_ID")
......
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