Skip to content
Snippets Groups Projects
Commit 99813a21 authored by Daniel Tran's avatar Daniel Tran
Browse files

[Projekt: xRM-ContactManagement][TicketNr.: 1079260][Aktivitäten die zu einem...

[Projekt: xRM-ContactManagement][TicketNr.: 1079260][Aktivitäten die zu einem Kontakt mit einer Firma existieren, werden bei Neuanlage eines Privaten Kontakts als weiter Funktion mit übernommen]
- Customized process, to fix misbehavior that activities
    of parent contact are shown in functions (child-contacts).
parent 8e0a6181
No related branches found
No related tags found
No related merge requests found
...@@ -14,28 +14,9 @@ if (vars.exists("$param.RowId_param") && vars.get("$param.RowId_param") && vars. ...@@ -14,28 +14,9 @@ if (vars.exists("$param.RowId_param") && vars.get("$param.RowId_param") && vars.
.and("ACTIVITYLINK.OBJECT_TYPE", "$param.ObjectId_param"); .and("ACTIVITYLINK.OBJECT_TYPE", "$param.ObjectId_param");
var rowId = vars.get("$param.RowId_param"); var rowId = vars.get("$param.RowId_param");
if (vars.get("$param.ObjectId_param") == "Person")
{ activityLinkSubselect.and("ACTIVITYLINK.OBJECT_ROWID", "$param.RowId_param");
//in the Person context, all activities linked to the person should be shown, so it is necessary to get all contactIds of that person condition.and(null, activityLinkSubselect, SqlBuilder.EXISTS());
var allPersonRelatedContactIds = newSelect("personContacts.CONTACTID")
.from("CONTACT")
.join("CONTACT", "CONTACT.PERSON_ID = personContacts.PERSON_ID", "personContacts")
.where("CONTACT.CONTACTID", "$param.RowId_param")
.arrayColumn();
if (allPersonRelatedContactIds.length === 0)
condition.noResult();
else
{
activityLinkSubselect.and("ACTIVITYLINK.OBJECT_ROWID", allPersonRelatedContactIds, SqlBuilder.IN());
condition.and(null, activityLinkSubselect, SqlBuilder.EXISTS());
}
}
else
{
activityLinkSubselect.and("ACTIVITYLINK.OBJECT_ROWID", "$param.RowId_param");
condition.and(null, activityLinkSubselect, SqlBuilder.EXISTS());
}
} }
if (vars.exists("$param.ActivityIDs_param") && vars.get("$param.ActivityIDs_param")) if (vars.exists("$param.ActivityIDs_param") && vars.get("$param.ActivityIDs_param"))
......
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