diff --git a/entity/Object_entity/recordcontainers/jdito/contentProcess.js b/entity/Object_entity/recordcontainers/jdito/contentProcess.js index 67b5e68f5a12833bca63247bd9903b8d63e57f87..27b0b7e83a11771b4ea8be2716a3fd61d1c5a6a7 100644 --- a/entity/Object_entity/recordcontainers/jdito/contentProcess.js +++ b/entity/Object_entity/recordcontainers/jdito/contentProcess.js @@ -19,8 +19,8 @@ if (vars.get("$param.ObjectType_param")) if (vars.exists("$param.ContactId") && vars.get("$param.ContactId")) contactId = vars.get("$param.ContactId"); - result.object(db.table(ContextUtils.getContextDataSql(objectType, contactId, false, undefined, false, excludedIds))) -} + result.object(db.table(ContextUtils.getContextDataSql(objectType, contactId, false, undefined, false, null, null, excludedIds))) +} else { result.object([]); diff --git a/process/Context_lib/process.js b/process/Context_lib/process.js index f65180f1d1dc110334162d896727449ea4a30ede..31d608284325922fc657f5e9388ee3782d68e8eb 100644 --- a/process/Context_lib/process.js +++ b/process/Context_lib/process.js @@ -662,7 +662,7 @@ ContextUtils.getContactId = function(pContextId, pRowId) * nur 360 * */ -ContextUtils.getContextDataSql = function(pContextId, pContactId, pWithDate, pActive, pWithState, pWithGroupBy, pUidsForFiltering) +ContextUtils.getContextDataSql = function(pContextId, pContactId, pWithDate, pActive, pWithState, pWithGroupBy, pUidsForFiltering, pExcludeIds) { var selectMap = ContextUtils.getSelectMap(); var ownContextSelector = selectMap[pContextId]; @@ -690,7 +690,8 @@ ContextUtils.getContextDataSql = function(pContextId, pContactId, pWithDate, pAc var contextDataSelect = newSelect( columns.join(", ") ) .from(ownContextSelector.getFullFromClause()) .where(ownContextSelector.getFullField(ownContextSelector.contactIdField), pContactId, SqlBuilder.IN()) - .andIfSet(ownContextSelector.getFullIdField(), pUidsForFiltering, SqlBuilder.IN()); + .andIfSet(ownContextSelector.getFullIdField(), pUidsForFiltering, SqlBuilder.IN()) + .andIfSet(ownContextSelector.getFullIdField(), pExcludeIds, SqlBuilder.NOT_IN()); if (pActive != undefined) {