Skip to content
Snippets Groups Projects
Commit 0d2b9f9a authored by Sebastian Listl's avatar Sebastian Listl :speech_balloon:
Browse files

Merge branch 'm_1083560_commsetting_address_filter' into '2021.2.3'

[Projekt: xRM-Marketing][TicketNr.: 1083560][Suchfilter Werbekennzeichen Adresse]

See merge request xrm/basic!1562
parents a3b831c2 ef2a308a
No related branches found
No related tags found
No related merge requests found
import("KeywordRegistry_basic");
import("Sql_lib");
import("system.result");
import("system.vars");
......@@ -5,8 +6,17 @@ import("MarketingCondition_lib");
var mediumId = vars.get("$local.name");
mediumId = mediumId.slice(mediumId.lastIndexOf(".") + 1);
var condition = new CommunicationSettingsCondition()
var condition;
if (mediumId != $KeywordRegistry.communicationMediumCampaign$letter())
{
condition = new CommunicationSettingsCondition()
.medium(mediumId);
}
else
{
condition = new CommunicationSettingsCondition()
.address();
}
var operator = vars.get("$local.comparison");
if (operator == "EQUAL" || operator == "NOT_EQUAL")
......
......@@ -7,19 +7,16 @@ var mediums = KeywordUtils.getEntryArray($KeywordRegistry.communicationMediumCam
var filterFields = [];
mediums.forEach(function ([mediumId, mediumTitle])
{
if (mediumId != $KeywordRegistry.communicationMediumCampaign$letter())
{
filterFields.push({
name: mediumId,
title: translate.withArguments("Communication Setting: %0", [mediumTitle]),
contentType: "TEXT",
hasDropDownValues: false,
isGroupable: false,
groupedRecordField: null,
titleRecordField: null,
consumer: "CommunicationSettingStatusKeyword"
});
}
filterFields.push({
name: mediumId,
title: translate.withArguments("Communication Setting: %0", [mediumTitle]),
contentType: "TEXT",
hasDropDownValues: false,
isGroupable: false,
groupedRecordField: null,
titleRecordField: null,
consumer: "CommunicationSettingStatusKeyword"
});
});
result.string(JSON.stringify(filterFields));
\ 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