Skip to content
Snippets Groups Projects
Commit 20732753 authored by Martin Groppe's avatar Martin Groppe
Browse files

[Projekt: xRM-Marketing][TicketNr.: 1075542][LINK: Erweiterung Redirect- und Workflowkennzeichen]

[Projekt: xRM-Marketing][TicketNr.: 1077052][BULKMAIL: direkte Zuordnung eines Interessensgebiets]
parent 09796c1b
No related branches found
No related tags found
No related merge requests found
Showing
with 160 additions and 5 deletions
......@@ -3,6 +3,7 @@
<changeSet author="m.groppe" id="96816f54-3067-470d-b698-dc7ad7685d84">
<addColumn tableName="BULKMAIL">
<column name="DATE_TO_SEND" type="DATETIME"/>
<column name="INTEREST_ID" type="char(36)"/>
</addColumn>
<renameColumn tableName="BULKMAIL" oldColumnName="SENDER" newColumnName="SENDER_EMAIL_ADDRESS "/>
</changeSet>
......
......@@ -15,6 +15,7 @@
<column name="DATE_NEW" type="DATETIME"/>
<column name="USER_EDIT" type="NVARCHAR(50)"/>
<column name="DATE_EDIT" type="DATETIME"/>
<column name="REDIRECT" type="SMALLINT"/>
<column name="WORKFLOWPROCESSDEFINITION_KEY" type="VARCHAR(255)"/>
</createTable>
</changeSet>
......
......@@ -18679,6 +18679,20 @@
<title></title>
<description></description>
</entityFieldDb>
<entityFieldDb>
<name>REDIRECT</name>
<dbName></dbName>
<primaryKey v="false" />
<columnType v="5" />
<size v="5" />
<scale v="0" />
<notNull v="false" />
<isUnique v="false" />
<index v="false" />
<documentation></documentation>
<title></title>
<description></description>
</entityFieldDb>
</entityFields>
</entityDb>
<entityDb>
......
......@@ -382,6 +382,20 @@
</entityParameter>
</children>
</entityConsumer>
<entityField>
<name>INTEREST_ID</name>
<title>Interest</title>
<consumer>Interests</consumer>
<displayValueProcess>%aditoprj%/entity/BulkMail_entity/entityfields/interests_id/displayValueProcess.js</displayValueProcess>
</entityField>
<entityConsumer>
<name>Interests</name>
<dependency>
<name>dependency</name>
<entityName>Interest_entity</entityName>
<fieldName>#PROVIDER</fieldName>
</dependency>
</entityConsumer>
</entityFields>
<recordContainers>
<dbRecordContainer>
......@@ -463,6 +477,10 @@
<name>DATE_TO_SEND.value</name>
<recordfield>BULKMAIL.DATE_TO_SEND</recordfield>
</dbRecordFieldMapping>
<dbRecordFieldMapping>
<name>INTEREST_ID.value</name>
<recordfield>BULKMAIL.INTEREST_ID</recordfield>
</dbRecordFieldMapping>
</recordFieldMappings>
<linkInformation>
<linkInformation>
......
import("system.vars");
import("system.result");
import("Context_lib");
result.string(ContextUtils.loadContentTitle("Interest_entity", vars.get("$field.INTEREST_ID")));
\ No newline at end of file
......@@ -18,6 +18,12 @@
<fieldName>Interests</fieldName>
<isConsumer v="false" />
</entityDependency>
<entityDependency>
<name>3b09958b-0175-47fa-9528-2d5570c21162</name>
<entityName>BulkMail_entity</entityName>
<fieldName>Interests</fieldName>
<isConsumer v="false" />
</entityDependency>
</dependencies>
</entityProvider>
<entityProvider>
......
......@@ -112,6 +112,28 @@
</entityParameter>
</children>
</entityConsumer>
<entityConsumer>
<name>WorkflowDefinitions</name>
<dependency>
<name>dependency</name>
<entityName>WorkflowDefinition_entity</entityName>
<fieldName>#PROVIDER</fieldName>
</dependency>
</entityConsumer>
<entityField>
<name>WORKFLOWPROCESSDEFINITION_KEY</name>
<title>Workflow</title>
<consumer>WorkflowDefinitions</consumer>
<stateProcess>%aditoprj%/entity/Link_entity/entityfields/workflowprocessdefinition_key/stateProcess.js</stateProcess>
<displayValueProcess>%aditoprj%/entity/Link_entity/entityfields/workflowprocessdefinition_key/displayValueProcess.js</displayValueProcess>
</entityField>
<entityField>
<name>REDIRECT</name>
<title>Redirect</title>
<contentType>BOOLEAN</contentType>
<stateProcess>%aditoprj%/entity/Link_entity/entityfields/redirect/stateProcess.js</stateProcess>
<valueProcess>%aditoprj%/entity/Link_entity/entityfields/redirect/valueProcess.js</valueProcess>
</entityField>
</entityFields>
<recordContainers>
<dbRecordContainer>
......@@ -166,6 +188,14 @@
<name>PLACEHOLDER.value</name>
<recordfield>LINK.PLACEHOLDER</recordfield>
</dbRecordFieldMapping>
<dbRecordFieldMapping>
<name>WORKFLOWPROCESSDEFINITION_KEY.value</name>
<recordfield>LINK.WORKFLOWPROCESSDEFINITION_KEY</recordfield>
</dbRecordFieldMapping>
<dbRecordFieldMapping>
<name>REDIRECT.value</name>
<recordfield>LINK.REDIRECT</recordfield>
</dbRecordFieldMapping>
</recordFieldMappings>
<linkInformation>
<linkInformation>
......
......@@ -4,11 +4,16 @@ import("Placeholder_lib");
import("Sql_lib");
if (vars.get("$local.value")){
var LinkPlaceholders = PlaceholderUtils.getPlaceholders().concat(PlaceholderUtils.getLinkPlaceholders());
if (LinkPlaceholders.map(function(a){
var defaultPlaceholders = PlaceholderUtils.getPlaceholders();
var linkPlaceholders = newSelect("LINK.PLACEHOLDER")
.from("LINK")
.where("LINK.LINKID",vars.get("$field.LINKID"),SqlBuilder.NOT_EQUAL())
.and("LINK.PLACEHOLDER is not null").arrayColumn();
if (defaultPlaceholders.map(function(a){
return a.placeholderName
}).indexOf(vars.get("$local.value"))!= -1){
}).indexOf(vars.get("$local.value"))!= -1 || linkPlaceholders.indexOf(vars.get("$local.value"))!= -1){
result.string("Placeholders must be unique")
}
......
import("system.result");
import("system.vars");
import("KeywordRegistry_basic");
import("system.neon");
var linktype = vars.get("$field.LINKTYPE");
if(linktype == $KeywordRegistry.linkType$EMail()){
result.string(neon.COMPONENTSTATE_AUTO);
}else{
result.string(neon.COMPONENTSTATE_INVISIBLE);
}
\ No newline at end of file
import("system.neon");
import("system.result");
import("system.vars");
if (!vars.get("$this.value") && vars.get("$sys.recordstate") == neon.OPERATINGSTATE_NEW )
{
result.string("0");
}
\ No newline at end of file
......@@ -8,4 +8,9 @@ if(vars.get("$sys.operatingstate") == neon.OPERATINGSTATE_NEW && vars.get("$loca
{
if(newSelect("URL").from("LINK").where("LINK.URL", vars.get("$local.value")).cell())
result.string(translate.text("Die Url muss eindeutig sein!"))
}
\ No newline at end of file
if(vars.get("$field.REDIRECT") == "1" && !/^(?:http(s)?:\/\/)[\w.-]+(?:\.[\w\.-]+)+[\w\-\._~:/?#[\]@!\$&'\(\)\*\+,;=.]+$/g.test(vars.get("$local.value"))){
result.string(translate.text("Redirect needs a full Url with http/https"));
}
}
import("system.vars");
import("system.result");
import("Context_lib");
result.string(ContextUtils.loadContentTitle("WorkflowDefinition_entity", vars.get("$field.WORKFLOWPROCESSDEFINITION_KEY")));
\ No newline at end of file
import("system.result");
import("system.vars");
import("KeywordRegistry_basic");
import("system.neon");
var linktype = vars.get("$field.LINKTYPE");
var redirect = vars.get("$field.REDIRECT");
if(linktype == $KeywordRegistry.linkType$EMail() && redirect == "1"){
result.string(neon.COMPONENTSTATE_AUTO);
}else{
result.string(neon.COMPONENTSTATE_INVISIBLE);
}
\ No newline at end of file
......@@ -28,6 +28,12 @@
<fieldName>WorkflowDefinitions</fieldName>
<isConsumer v="false" />
</entityDependency>
<entityDependency>
<name>349ab9d2-edbb-4571-be14-3fb749bfff50</name>
<entityName>Link_entity</entityName>
<fieldName>WorkflowDefinitions</fieldName>
<isConsumer v="false" />
</entityDependency>
</dependencies>
</entityProvider>
<entityField>
......
......@@ -76,6 +76,10 @@
<name>06f08869-5a81-41cb-8c7e-51be6a7041a7</name>
<entityField>DESCRIPTION</entityField>
</entityFieldLink>
<entityFieldLink>
<name>1891cd3a-34a5-4c7d-9e35-635640476c63</name>
<entityField>INTEREST_ID</entityField>
</entityFieldLink>
</fields>
</genericViewTemplate>
<genericViewTemplate>
......
......@@ -55,6 +55,10 @@
<name>65546b24-3f6d-4639-b144-491ff5c478c1</name>
<entityField>USE_TEMPLATE_ATTACHMENTS</entityField>
</entityFieldLink>
<entityFieldLink>
<name>9f3df668-6741-4faf-9afc-a0d761db990a</name>
<entityField>INTEREST_ID</entityField>
</entityFieldLink>
</fields>
</genericViewTemplate>
<neonViewReference>
......
......@@ -31,6 +31,14 @@
<name>4313c2fb-3551-4c66-81c9-ad950c44a105</name>
<entityField>PLACEHOLDER</entityField>
</entityFieldLink>
<entityFieldLink>
<name>2b22fb4a-5e7e-48ee-b6d1-3ee4381fb419</name>
<entityField>REDIRECT</entityField>
</entityFieldLink>
<entityFieldLink>
<name>90ab2682-bc2d-4989-ab7b-b47045a3cbf3</name>
<entityField>WORKFLOWPROCESSDEFINITION_KEY</entityField>
</entityFieldLink>
</fields>
</genericViewTemplate>
<neonViewReference>
......
......@@ -28,6 +28,14 @@
<name>92bb0227-5418-4a61-a7cd-eccc8def83f9</name>
<entityField>PLACEHOLDER</entityField>
</entityFieldLink>
<entityFieldLink>
<name>840b0f8d-763f-402d-b318-6317402a7c6c</name>
<entityField>REDIRECT</entityField>
</entityFieldLink>
<entityFieldLink>
<name>a807f6b9-252c-4545-a2c9-266c64012097</name>
<entityField>WORKFLOWPROCESSDEFINITION_KEY</entityField>
</entityFieldLink>
</fields>
</genericViewTemplate>
</children>
......
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