Skip to content
Snippets Groups Projects
Commit da9e72d0 authored by Johannes Goderbauer's avatar Johannes Goderbauer
Browse files

Merge branch '#1057201_Beziehungen_Bearbeiten' into '2020.1.0'

#1057201 beziehungen bearbeiten

See merge request xrm/basic!253
parents 543ac478 bf9110bb
No related branches found
No related tags found
No related merge requests found
......@@ -2,6 +2,7 @@ import("system.db");
import("system.translate");
import("system.result");
import("system.vars");
import("system.neon");
import("ObjectRelation_lib");
import("Context_lib");
import("Sql_lib");
......@@ -238,9 +239,15 @@ function _getEntryData(pObjectId, pDirection, pRelationType1, pRelationType2, pP
onConditionForRelationTypeJoin = newWhere("AB_OBJECTRELATIONTYPEID = AB_OBJECTRELATIONTYPE" + myNum)
.and("AB_OBJECTRELATION.AB_OBJECTRELATIONTYPE1", pRelationType1)
.and("AB_OBJECTRELATION.AB_OBJECTRELATIONTYPE2", pRelationType2)
.and("AB_OBJECTRELATION.OBJECT" + myNum + "_ROWID", pObjectId)
.andIfSet("AB_OBJECTRELATION.AB_OBJECTRELATIONID", pObjectRelationId || null); // set id to null, as only null works with .andIfSet
// wird benoetigt zum Bearbeiten
if (vars.get("$sys.recordstate") == neon.OPERATINGSTATE_EDIT)
onConditionForRelationTypeJoin.and("AB_OBJECTRELATION.OBJECT" + otherNum + "_ROWID", pObjectId);
else
onConditionForRelationTypeJoin.and("AB_OBJECTRELATION.OBJECT" + myNum + "_ROWID", pObjectId);
// exclude previous node
if (!pPrevId)
onConditionForRelationTypeJoin.and("AB_OBJECTRELATION.OBJECT" + otherNum + "_ROWID is not null");
......
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