Skip to content
Snippets Groups Projects
Commit 409ae5c2 authored by Alexander Vögl's avatar Alexander Vögl Committed by Johannes Goderbauer
Browse files

Quality of Life changes & smaller Fixes due to in inconsistency

[Projekt: Entwicklung - xRM][TicketNr.: 1067652][Fehler Campagin und CampaignParticipants]
parent 5957d01d
No related branches found
No related tags found
No related merge requests found
Showing
with 260 additions and 148 deletions
<?xml version="1.1" encoding="UTF-8" standalone="no"?>
<databaseChangeLog xmlns="http://www.liquibase.org/xml/ns/dbchangelog"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.6.xsd">
<changeSet author="a.voegl" id="2a30b35b-9882-468e-98a6-a10f0561a681">
<addColumn tableName="CAMPAIGNPARTICIPANT">
<column name="RESPONSIBLE_CONTACT_ID" type="CHAR(36)"/>
</addColumn>
</changeSet>
</databaseChangeLog>
\ No newline at end of file
......@@ -4,6 +4,7 @@
<include relativeToChangelogFile="true" file="insert_commMediumTitleKeywordAttribute.xml"/>
<include relativeToChangelogFile="true" file="Knowledgemanagement/changelog_knowledgeManagement.xml"/>
<include relativeToChangelogFile="true" file="insert_employeeCountAttribute.xml"/>
<include relativeToChangelogFile="true" file="alter_CampaignParticipantResponsible.xml"/>
<include relativeToChangelogFile="true" file="MSTeams/changelog.xml"/>
<include relativeToChangelogFile="true" file="insert_newsletterAttribute.xml"/>
</databaseChangeLog>
......@@ -6,6 +6,7 @@
<title>Add participants to Campaign</title>
<siblings>
<element>CampaignParticipant_entity</element>
<element>Campaign_entity</element>
</siblings>
<recordContainer>datalessConfig</recordContainer>
<entityFields>
......@@ -59,6 +60,11 @@
</entityConsumer>
<entityConsumer>
<name>CampaignStepConsumer</name>
<dependency>
<name>dependency</name>
<entityName>CampaignStep_entity</entityName>
<fieldName>CampaignSteps</fieldName>
</dependency>
<children>
<entityParameter>
<name>campaignId_param</name>
......@@ -66,12 +72,11 @@
<expose v="true" />
</entityParameter>
</children>
<dependency>
<name>dependency</name>
<entityName>CampaignStep_entity</entityName>
<fieldName>CampaignSteps</fieldName>
</dependency>
</entityConsumer>
<entityField>
<name>UID</name>
<state>EDITABLE</state>
</entityField>
<entityParameter>
<name>currentCampaignId_param</name>
<expose v="true" />
......@@ -152,6 +157,15 @@
</entityProvider>
</entityFields>
<recordContainers>
<jDitoRecordContainer>
<name>jdito</name>
<jDitoRecordAlias>Data_alias</jDitoRecordAlias>
<recordFieldMappings>
<jDitoRecordFieldMapping>
<name>UID.value</name>
</jDitoRecordFieldMapping>
</recordFieldMappings>
</jDitoRecordContainer>
<datalessRecordContainer>
<name>datalessConfig</name>
<alias>Data_alias</alias>
......
......@@ -31,7 +31,7 @@ else
participantCondition = JSON.parse(vars.getString("$param.campaignParticipantsCondition_param")).condition;
_handleCondition(campaignId, conditionSourceTableName, participantCondition);
}
neon.refreshAll();
if (!vars.exists("$param.currentCampaignId_param") || !vars.get("$param.currentCampaignId_param"))
neon.openContext("Campaign", "CampaignMain_view", [campaignId], neon.OPERATINGSTATE_VIEW, null);
......
......@@ -6,6 +6,7 @@
<siblings>
<element>CampaignCost_entity</element>
</siblings>
<usePermissions v="false" />
<recordContainer>jdito</recordContainer>
<entityFields>
<entityProvider>
......
......@@ -6,6 +6,7 @@
<siblings>
<element>CampaignCost_entity</element>
</siblings>
<usePermissions v="false" />
<recordContainer>jdito</recordContainer>
<entityFields>
<entityProvider>
......
......@@ -7,6 +7,7 @@
<element>CampaignAnalysis_entity</element>
<element>CampaignCostChart_entity</element>
</siblings>
<usePermissions v="false" />
<titlePlural>Cost entries</titlePlural>
<recordContainer>db</recordContainer>
<entityFields>
......@@ -236,6 +237,14 @@
<name>#PROVIDER_AGGREGATES</name>
<useAggregates v="true" />
</entityProvider>
<entityAggregateField>
<name>NET_aggregate</name>
<parentField>NET</parentField>
</entityAggregateField>
<entityAggregateField>
<name>NETPERPARTICIPANT_aggregate</name>
<parentField>netPerParticipant</parentField>
</entityAggregateField>
</entityFields>
<recordContainers>
<dbRecordContainer>
......@@ -312,6 +321,15 @@
<name>CURRENCY.value</name>
<recordfield>CAMPAIGN.CURRENCY</recordfield>
</dbRecordFieldMapping>
<aggregateFieldDbMapping>
<name>NET_aggregate.value</name>
<recordfield>CAMPAIGNCOST.NET</recordfield>
<aggregateType>SUM</aggregateType>
</aggregateFieldDbMapping>
<aggregateFieldDbMapping>
<name>NETPERPARTICIPANT_aggregate.value</name>
<expression>%aditoprj%/entity/CampaignCost_entity/recordcontainers/db/recordfieldmappings/netperparticipant_aggregate.value/expression.js</expression>
</aggregateFieldDbMapping>
</recordFieldMappings>
</dbRecordContainer>
</recordContainers>
......
import("system.result");
result.string("SUM(CAMPAIGNCOST.NET/(select COUNT(*) from CAMPAIGNPARTICIPANT where CAMPAIGNCOST.CAMPAIGN_ID = CAMPAIGNPARTICIPANT.CAMPAIGN_ID "
+" and CAMPAIGNPARTICIPANT.CAMPAIGNSTEP_ID = CAMPAIGNSTEP.CAMPAIGNSTEPID))");
\ No newline at end of file
......@@ -8,6 +8,7 @@
<element>CampaignStep_entity</element>
<element>CampaignAddParticipants_entity</element>
</siblings>
<usePermissions v="false" />
<recordContainer>jdito</recordContainer>
<entityFields>
<entityProvider>
......
......@@ -7,34 +7,21 @@
<siblings>
<element>CampaignAddParticipants_entity</element>
<element>CampaignParticipantChart_entity</element>
<element>Campaign_entity</element>
</siblings>
<afterOperatingState>%aditoprj%/entity/CampaignParticipant_entity/afterOperatingState.js</afterOperatingState>
<useFavorites v="true" />
<usePermissions v="false" />
<titlePlural>Participants</titlePlural>
<recordContainer>ParticipantsDbRecordContainer</recordContainer>
<recordContainer>db</recordContainer>
<entityFields>
<entityProvider>
<name>#PROVIDER</name>
<recordContainer>db</recordContainer>
</entityProvider>
<entityProvider>
<name>CampaignParticipantsProvider</name>
<targetContextField>CONTACTCONTEXT</targetContextField>
<targetIdField>CONTACT_ID</targetIdField>
<documentation>%aditoprj%/entity/CampaignParticipant_entity/entityfields/campaignparticipantsprovider/documentation.adoc</documentation>
<children>
<entityParameter>
<name>ContactId_param</name>
<expose v="true" />
</entityParameter>
<entityParameter>
<name>CampaignId_param</name>
<expose v="true" />
</entityParameter>
<entityParameter>
<name>CampaignStepId_param</name>
<expose v="true" />
</entityParameter>
</children>
<recordContainer>db</recordContainer>
<dependencies>
<entityDependency>
<name>f28945cd-4613-4dfa-91f7-a7d9d64cef58</name>
......@@ -49,6 +36,20 @@
<isConsumer v="false" />
</entityDependency>
</dependencies>
<children>
<entityParameter>
<name>ContactId_param</name>
<expose v="true" />
</entityParameter>
<entityParameter>
<name>CampaignId_param</name>
<expose v="true" />
</entityParameter>
<entityParameter>
<name>CampaignStepId_param</name>
<expose v="true" />
</entityParameter>
</children>
</entityProvider>
<entityParameter>
<name>CampaignStepId_param</name>
......@@ -113,11 +114,9 @@
<name>CONTACT_ID</name>
<title>Participant</title>
<consumer>AnyContacts</consumer>
<linkedContextProcess>%aditoprj%/entity/CampaignParticipant_entity/entityfields/contact_id/linkedContextProcess.js</linkedContextProcess>
<mandatory v="true" />
<state>READONLY</state>
<stateProcess>%aditoprj%/entity/CampaignParticipant_entity/entityfields/contact_id/stateProcess.js</stateProcess>
<valueProcess>%aditoprj%/entity/CampaignParticipant_entity/entityfields/contact_id/valueProcess.js</valueProcess>
<displayValueProcess>%aditoprj%/entity/CampaignParticipant_entity/entityfields/contact_id/displayValueProcess.js</displayValueProcess>
</entityField>
<entityField>
......@@ -145,6 +144,11 @@
<entityConsumer>
<name>CampaignSteps</name>
<refreshParent v="true" />
<dependency>
<name>dependency</name>
<entityName>CampaignStep_entity</entityName>
<fieldName>CampaignSteps</fieldName>
</dependency>
<children>
<entityParameter>
<name>campaignId_param</name>
......@@ -152,11 +156,6 @@
<expose v="true" />
</entityParameter>
</children>
<dependency>
<name>dependency</name>
<entityName>CampaignStep_entity</entityName>
<fieldName>CampaignSteps</fieldName>
</dependency>
</entityConsumer>
<entityField>
<name>CONTACTCONTEXT</name>
......@@ -170,20 +169,12 @@
<title>Update campaign step</title>
<onActionProcess>%aditoprj%/entity/CampaignParticipant_entity/entityfields/filterviewactiongroup/children/setsteptoparticipantselection/onActionProcess.js</onActionProcess>
<isObjectAction v="false" />
<isSelectionAction v="false" />
<isSelectionAction v="true" />
<iconId>NEON:GROUP_APPOINTMENT</iconId>
<state>DISABLED</state>
<stateProcess>%aditoprj%/entity/CampaignParticipant_entity/entityfields/filterviewactiongroup/children/setsteptoparticipantselection/stateProcess.js</stateProcess>
<state>AUTO</state>
<tooltip>Update campaign step</tooltip>
<tooltipProcess>%aditoprj%/entity/CampaignParticipant_entity/entityfields/filterviewactiongroup/children/setsteptoparticipantselection/tooltipProcess.js</tooltipProcess>
</entityActionField>
<entityActionField>
<name>startMarketingWorkflows</name>
<title>Start marketing mailing</title>
<onActionProcess>%aditoprj%/entity/CampaignParticipant_entity/entityfields/filterviewactiongroup/children/startmarketingworkflows/onActionProcess.js</onActionProcess>
<isObjectAction v="false" />
<iconId>VAADIN:ENVELOPES</iconId>
</entityActionField>
</children>
</entityActionGroup>
<entityField>
......@@ -212,17 +203,17 @@
</entityConsumer>
<entityConsumer>
<name>CommRestrictionIcon</name>
<dependency>
<name>dependency</name>
<entityName>KeywordAttribute_entity</entityName>
<fieldName>SpecificContainerKeyword</fieldName>
</dependency>
<children>
<entityParameter>
<name>ContainerName_param</name>
<valueProcess>%aditoprj%/entity/CampaignParticipant_entity/entityfields/commrestrictionicon/children/containername_param/valueProcess.js</valueProcess>
</entityParameter>
</children>
<dependency>
<name>dependency</name>
<entityName>KeywordAttribute_entity</entityName>
<fieldName>SpecificContainerKeyword</fieldName>
</dependency>
</entityConsumer>
<entityField>
<name>STANDARD_EMAIL_COMMUNICATION</name>
......@@ -237,29 +228,102 @@
<entityProvider>
<name>#PROVIDER_AGGREGATES</name>
<useAggregates v="true" />
<recordContainer>db</recordContainer>
</entityProvider>
<entityField>
<name>HASADVERTISINGBAN</name>
<title>Advertising ban</title>
<contentType>BOOLEAN</contentType>
<dropDownProcess>%aditoprj%/entity/CampaignParticipant_entity/entityfields/hasadvertisingban/dropDownProcess.js</dropDownProcess>
<name>CONTACT_ORGANISATION_ID</name>
<title>Organisation</title>
<linkedContext>Organisation</linkedContext>
</entityField>
<entityField>
<name>CONTACT_PERSON_ID</name>
<title>Participant</title>
<linkedContext>Person</linkedContext>
</entityField>
<entityField>
<name>PERSON_CONTACT_ID</name>
<title>Person</title>
<consumer>Persons</consumer>
<linkedContext>Person</linkedContext>
</entityField>
<entityField>
<name>ORGANISATION_CONTACT_ID</name>
<title>Organisation</title>
<consumer>Organisations</consumer>
<groupable v="true" />
<linkedContext>Organisation</linkedContext>
</entityField>
<entityConsumer>
<name>Persons</name>
<dependency>
<name>dependency</name>
<entityName>Person_entity</entityName>
<fieldName>Contacts</fieldName>
</dependency>
</entityConsumer>
<entityConsumer>
<name>Organisations</name>
<dependency>
<name>dependency</name>
<entityName>Organisation_entity</entityName>
<fieldName>Organisations</fieldName>
</dependency>
</entityConsumer>
<entityField>
<name>RESPONSIBLE_CONTACT_ID</name>
<title>Verantwortlicher</title>
<consumer>ResponsibleEmployees</consumer>
<groupable v="true" />
<linkedContext>Person</linkedContext>
<valueProcess>%aditoprj%/entity/CampaignParticipant_entity/entityfields/responsible_contact_id/valueProcess.js</valueProcess>
<displayValueProcess>%aditoprj%/entity/CampaignParticipant_entity/entityfields/responsible_contact_id/displayValueProcess.js</displayValueProcess>
</entityField>
<entityConsumer>
<name>ResponsibleEmployees</name>
<dependency>
<name>dependency</name>
<entityName>Employee_entity</entityName>
<fieldName>Employees</fieldName>
</dependency>
</entityConsumer>
</entityFields>
<recordContainers>
<dbRecordContainer>
<name>ParticipantsDbRecordContainer</name>
<name>db</name>
<alias>Data_alias</alias>
<hasDependentRecords v="true" />
<conditionProcess>%aditoprj%/entity/CampaignParticipant_entity/recordcontainers/participantsdbrecordcontainer/conditionProcess.js</conditionProcess>
<onDBInsert>%aditoprj%/entity/CampaignParticipant_entity/recordcontainers/participantsdbrecordcontainer/onDBInsert.js</onDBInsert>
<fromClauseProcess>%aditoprj%/entity/CampaignParticipant_entity/recordcontainers/db/fromClauseProcess.js</fromClauseProcess>
<conditionProcess>%aditoprj%/entity/CampaignParticipant_entity/recordcontainers/db/conditionProcess.js</conditionProcess>
<onDBInsert>%aditoprj%/entity/CampaignParticipant_entity/recordcontainers/db/onDBInsert.js</onDBInsert>
<linkInformation>
<linkInformation>
<name>12b5bf2e-e376-4c40-9799-fb07961a455d</name>
<name>02d0ac80-2767-401c-bdc1-aac3e8abf0e4</name>
<tableName>CAMPAIGNPARTICIPANT</tableName>
<primaryKey>CAMPAIGNPARTICIPANTID</primaryKey>
<isUIDTable v="true" />
<readonly v="false" />
</linkInformation>
<linkInformation>
<name>6c320211-601b-47bf-a562-003886666040</name>
<tableName>CONTACT</tableName>
<primaryKey>CONTACTID</primaryKey>
<isUIDTable v="false" />
<readonly v="true" />
</linkInformation>
<linkInformation>
<name>e1719eb5-112c-4acd-8f72-58a688d5f058</name>
<tableName>PERSON</tableName>
<primaryKey>PERSONID</primaryKey>
<isUIDTable v="false" />
<readonly v="true" />
</linkInformation>
<linkInformation>
<name>8be80af4-69ea-4a5d-b404-8a26c1f8d8da</name>
<tableName>ORGANISATION</tableName>
<primaryKey>ORGANISATIONID</primaryKey>
<isUIDTable v="false" />
<readonly v="true" />
</linkInformation>
</linkInformation>
<recordFieldMappings>
<dbRecordFieldMapping>
......@@ -300,25 +364,68 @@
<recordfield>CAMPAIGNPARTICIPANT.CAMPAIGNPARTICIPANTID</recordfield>
</dbRecordFieldMapping>
<dbRecordFieldMapping>
<name>STANDARD_EMAIL_COMMUNICATION.value</name>
<expression>%aditoprj%/entity/CampaignParticipant_entity/recordcontainers/participantsdbrecordcontainer/recordfieldmappings/standard_email_communication.value/expression.js</expression>
<isFilterable v="true" />
<name>STANDARD_PHONE_COMMUNICATION.displayValue</name>
<expression>%aditoprj%/entity/CampaignParticipant_entity/recordcontainers/db/recordfieldmappings/standard_phone_communication.displayvalue/expression.js</expression>
</dbRecordFieldMapping>
<dbRecordFieldMapping>
<name>STANDARD_EMAIL_COMMUNICATION.displayValue</name>
<expression>%aditoprj%/entity/CampaignParticipant_entity/recordcontainers/db/recordfieldmappings/standard_email_communication.displayvalue/expression.js</expression>
</dbRecordFieldMapping>
<dbRecordFieldMapping>
<name>ADVERTISINGBAN_ICON.value</name>
<expression>%aditoprj%/entity/CampaignParticipant_entity/recordcontainers/db/recordfieldmappings/advertisingban_icon.value/expression.js</expression>
</dbRecordFieldMapping>
<dbRecordFieldMapping>
<name>CONTACT_PERSON_ID.displayValue</name>
<expression>%aditoprj%/entity/CampaignParticipant_entity/recordcontainers/db/recordfieldmappings/contact_person_id.displayvalue/expression.js</expression>
</dbRecordFieldMapping>
<dbRecordFieldMapping>
<name>CAMPAIGNSTEP_ID.displayValue</name>
<expression>%aditoprj%/entity/CampaignParticipant_entity/recordcontainers/participantsdbrecordcontainer/recordfieldmappings/campaignstep_id.displayvalue/expression.js</expression>
</dbRecordFieldMapping>
<dbRecordFieldMapping>
<name>STANDARD_PHONE_COMMUNICATION.value</name>
<expression>%aditoprj%/entity/CampaignParticipant_entity/recordcontainers/participantsdbrecordcontainer/recordfieldmappings/standard_phone_communication.value/expression.js</expression>
<name>campaignStepCurrentParticipantCount.value</name>
<expression>%aditoprj%/entity/CampaignParticipant_entity/recordcontainers/participantsdbrecordcontainer/recordfieldmappings/campaignstepcurrentparticipantcount.value/expression.js</expression>
</dbRecordFieldMapping>
<consumerMapping>
<name>AnyContacts</name>
<filterConditionProcess>%aditoprj%/entity/CampaignParticipant_entity/recordcontainers/participantsdbrecordcontainer/recordfieldmappings/anycontacts/filterConditionProcess.js</filterConditionProcess>
<dbRecordFieldMapping>
<name>ORGANISATION_CONTACT_ID.value</name>
<expression>%aditoprj%/entity/CampaignParticipant_entity/recordcontainers/db/recordfieldmappings/organisation_contact_id.value/expression.js</expression>
<isFilterable v="true" />
<filtertype>BASIC</filtertype>
</consumerMapping>
</dbRecordFieldMapping>
<dbRecordFieldMapping>
<name>HASADVERTISINGBAN.value</name>
<expression>%aditoprj%/entity/CampaignParticipant_entity/recordcontainers/participantsdbrecordcontainer/recordfieldmappings/hasadvertisingban.value/expression.js</expression>
<name>PERSON_CONTACT_ID.value</name>
<recordfield>CONTACT.CONTACTID</recordfield>
<isFilterable v="true" />
</dbRecordFieldMapping>
<dbRecordFieldMapping>
<name>PERSON_CONTACT_ID.displayValue</name>
<expression>%aditoprj%/entity/CampaignParticipant_entity/recordcontainers/db/recordfieldmappings/person_contact_id.displayvalue/expression.js</expression>
</dbRecordFieldMapping>
<dbRecordFieldMapping>
<name>RESPONSIBLE_CONTACT_ID.value</name>
<recordfield>CAMPAIGNPARTICIPANT.RESPONSIBLE_CONTACT_ID</recordfield>
<isFilterable v="true" />
</dbRecordFieldMapping>
<dbRecordFieldMapping>
<name>RESPONSIBLE_CONTACT_ID.displayValue</name>
<expression>%aditoprj%/entity/CampaignParticipant_entity/recordcontainers/db/recordfieldmappings/responsible_contact_id.displayvalue/expression.js</expression>
</dbRecordFieldMapping>
<dbRecordFieldMapping>
<name>CONTACT_ORGANISATION_ID.displayValue</name>
<recordfield>ORGANISATION.NAME</recordfield>
</dbRecordFieldMapping>
<dbRecordFieldMapping>
<name>CONTACT_ORGANISATION_ID.value</name>
<recordfield>CONTACT.ORGANISATION_ID</recordfield>
</dbRecordFieldMapping>
<dbRecordFieldMapping>
<name>CONTACT_PERSON_ID.value</name>
<recordfield>CONTACT.PERSON_ID</recordfield>
</dbRecordFieldMapping>
<dbRecordFieldMapping>
<name>ORGANISATION_CONTACT_ID.displayValue</name>
<recordfield>ORGANISATION.NAME</recordfield>
</dbRecordFieldMapping>
</recordFieldMappings>
</dbRecordContainer>
</recordContainers>
......
import("Util_lib");
import("system.result");
import("Sql_lib");
import("system.db");
import("system.vars");
import("system.neon");
import("Campaign_lib");
var hasAdvertisingBan = Utils.toBoolean(vars.get("$field.HASADVERTISINGBAN"));
result.string(hasAdvertisingBan ? neon.PRIORITY_MEDIUM_COLOR : neon.PRIORITY_LOW_COLOR);
\ No newline at end of file
if(vars.get("$field.ADVERTISINGBAN_ICON") > 0)
{
result.string(neon.PRIORITY_MEDIUM_COLOR);
}
else
{
result.string(neon.PRIORITY_LOW_COLOR);
}
import("Util_lib");
import("system.result");
import("system.vars");
// Now show warning always, if any commrestriction exists. No matter which medium the current step has.
var hasAdvertisingBan = Utils.toBoolean(vars.get("$field.HASADVERTISINGBAN"));
result.string(hasAdvertisingBan ? "VAADIN:WARNING" : "VAADIN:CHECK");
\ No newline at end of file
if (vars.get("$field.ADVERTISINGBAN_ICON") == 0)
{
result.string("VAADIN:CHECK");
}
else
{
result.string("VAADIN:WARNING");
}
\ No newline at end of file
import("system.vars");
import("system.result");
import("system.neon");
if (vars.get("$sys.viewmode") == neon.FRAME_VIEWMODE_TABLE)
result.string(vars.get("$param.CampaignId_param"));
else
result.string(vars.get("$field.CAMPAIGN_ID"));
\ No newline at end of file
var campaignID = vars.get("$field.CAMPAIGN_ID");
if(!campaignID)
campaignID = vars.get("$param.CampaignId_param");
result.string(campaignID);
\ No newline at end of file
......@@ -3,10 +3,4 @@ import("system.vars");
import("Contact_lib");
import("system.neon");
let contactId = vars.getString("$field.CONTACT_ID");
let displayValue = "";
if(contactId != "")
displayValue = ContactUtils.getFullTitleByContactId(contactId);
result.string(displayValue);
result.string(ContactUtils.getFullTitleByContactId(vars.getString("$field.CONTACT_ID")));
\ No newline at end of file
import("system.result");
import("system.vars");
if(vars.exists("$param.ContactId_param") && vars.get("$param.ContactId_param"))
result.string(vars.get("$param.ContactId_param"));
\ No newline at end of file
import("Campaign_lib");
import("system.vars");
import("system.neon");
import("system.result");
var campaignId = vars.get("$field.CAMPAIGN_ID");
var participantCount = CampaignUtils.getParticipantCount(campaignId);
if(participantCount > 0)
{
result.string(neon.COMPONENTSTATE_EDITABLE);
}
else
{
result.string(neon.COMPONENTSTATE_DISABLED);
}
\ No newline at end of file
import("Util_lib");
import("system.entities");
import("Context_lib");
import("system.vars");
import("system.neon");
var rows = vars.get("$sys.selectionRows");
var filter = vars.get("$sys.filter").filter;
var targets = [];
if (Utils.isNullOrEmpty(rows))
{
let loadConfig = entities.createConfigForLoadingRows()
.entity("CampaignParticipant_entity")
.provider("CampaignParticipantsProvider")
.fields(["CONTACT_ID", "CONTACTCONTEXT"])
.addParameter("CampaignId_param", vars.get("$param.CampaignId_param"))
.addParameter("CampaignStepId_param", vars.get("$param.CampaignStepId_param"))
.addParameter("ContactId_param", vars.get("$param.ContactId_param"));
if (filter)
loadConfig.filter(JSON.stringify(filter));
rows = entities.getRows(loadConfig);
}
rows = rows.map(function (row)
{
return [row["CONTACT_ID"], row["CONTACTCONTEXT"]];
});
neon.openContext("MarketingWorkflowLauncher", "MarketingWorkflowLauncherEdit_view", null, neon.OPERATINGSTATE_VIEW, {
"ObjectIds_param": JSON.stringify(rows),
"ObjectType_param": ContextUtils.getCurrentContextId()
});
\ No newline at end of file
import("system.translate");
import("system.result");
result.object([
["1", translate.text("Yes")],
["0", translate.text("No")]
]);
\ No newline at end of file
......@@ -2,4 +2,4 @@ import("system.vars");
import("system.result");
import("Contact_lib");
result.string(ContactUtils.getContextByContactId(vars.getString("$field.CONTACT_ID")));
\ No newline at end of file
result.string(ContactUtils.getTitleByContactId(vars.get("$field.RESPONSIBLE_CONTACT_ID")));
\ No newline at end of file
import("system.neon");
import("system.vars");
import("system.result");
import("system.neon");
if(vars.get("$sys.recordstate") == neon.OPERATINGSTATE_NEW && vars.exists("$param.name_param") && vars.get("$param.name_param") && !vars.get("$this.value"))
{
result.string(vars.get("$param.name_param"));
}
\ No newline at end of file
if(vars.get("$sys.recordstate") == neon.OPERATINGSTATE_NEW && vars.get("$this.value") == null)
result.string(vars.get("$global.user.contactId"));
\ 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