Skip to content
Snippets Groups Projects
Commit 81aa6d7b authored by Benjamin Ulrich's avatar Benjamin Ulrich :speech_balloon:
Browse files

Merge branch 'm_1085867_mosaico_link_anbindung' into '2021.2.0'

M 1085867 mosaico link anbindung

See merge request xrm/basic!1292
parents 0d2eae09 65113550
No related branches found
No related tags found
No related merge requests found
Showing
with 659 additions and 51 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="m.groppe" id="14703c1c-8052-42dd-8ec5-4b9e828a3c28">
<addColumn tableName="BULKMAIL">
<column name="ISOLANGUAGE" type="CHAR(3)"/>
</addColumn>
</changeSet>
</databaseChangeLog>
\ No newline at end of file
<?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="m.groppe" id="76e38ecb-a7f9-4c63-8089-e14296fb5f09">
<preConditions onFail="MARK_RAN">
<not>
<columnExists tableName="BULKMAIL" columnName="MOSAICOTEMPLATE_ID" />
</not>
</preConditions>
<addColumn tableName="BULKMAIL">
<column name="MOSAICOTEMPLATE_ID" type="CHAR(36)"/>
</addColumn>
</changeSet>
</databaseChangeLog>
\ No newline at end of file
<?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">
<include relativeToChangelogFile="true" file="create_mosaicoTemplate.xml"/>
<include relativeToChangelogFile="true" file="insert_mosaicoBaseTemplate.xml"/>
<include relativeToChangelogFile="true" file="alter_bulkMailAddMosaicoTemplateId.xml"/>
<include relativeToChangelogFile="true" file="insert_mosaicoTemplateCategory.xml"/>
<include relativeToChangelogFile="true" file="alter_bulkMailAddISOLanguage.xml"/>
</databaseChangeLog>
\ No newline at end of file
<?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="m.groppe" id="7c12f422-7d10-4c08-b5ee-11e166e71ba0">
<createTable tableName="MOSAICOTEMPLATE">
<column name="MOSAICOTEMPLATEID" type="CHAR(36)">
<constraints nullable="false" primaryKey="true" primaryKeyName="PK_MOSAICOTEMPLATEID"/>
</column>
<column name="NAME" type="NVARCHAR(250)">
<constraints nullable="false"/>
</column>
<column name="CATEGORY" type="varchar(36)"/>
<column name="ISOLANGUAGE" type="CHAR(3)"/>
<column name="METADATA" type="NCLOB"/>
<column name="CONTENT" type="NCLOB"/>
<column name="USER_NEW" type="NVARCHAR(50)">
<constraints nullable="false"/>
</column>
<column name="DATE_NEW" type="DATETIME">
<constraints nullable="false"/>
</column>
<column name="USER_EDIT" type="NVARCHAR(50)" />
<column name="DATE_EDIT" type="DATETIME" />
<column name="BASETEMPLATE" type="VARCHAR(36)"/>
</createTable>
</changeSet>
</databaseChangeLog>
\ No newline at end of file
<?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="m.groppe" id="d5e4eec9-d3df-4557-bdbe-39b84c9a000a">
<insert tableName="AB_KEYWORD_CATEGORY">
<column name="AB_KEYWORD_CATEGORYID" value="ed4e3c0d-e0ed-4476-b2b9-76b821f03c2f"/>
<column name="NAME" value="MosaicoBaseTemplate"/>
<column name="SORTINGBY" valueNumeric="0"/>
<column name="SORTINGDIRECTION" value="ASC"/>
</insert>
<insert tableName="AB_KEYWORD_ENTRY">
<column name="AB_KEYWORD_ENTRYID" value="e42140fe-7df3-4452-80b7-f914d8c03d0e"/>
<column name="AB_KEYWORD_CATEGORY_ID" value="ed4e3c0d-e0ed-4476-b2b9-76b821f03c2f"/>
<column name="KEYID" value="adito-versafix-1"/>
<column name="TITLE" value="Adito Versafix"/>
<column name="CONTAINER" value="MosaicoBaseTemplate"/>
<column name="SORTING" valueNumeric="1"/>
<column name="ISACTIVE" valueNumeric="1"/>
<column name="ISESSENTIAL" valueNumeric="0"/>
</insert>
</changeSet>
</databaseChangeLog>
\ No newline at end of file
<?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="m.groppe" id="b45ae681-b484-4815-a953-4c8ba5375363">
<insert tableName="AB_KEYWORD_CATEGORY">
<column name="AB_KEYWORD_CATEGORYID" value="be28e8a4-08d4-4697-b248-8b97b4e6e749"/>
<column name="NAME" value="MosaicoTemplateCategory"/>
<column name="SORTINGBY" valueNumeric="0"/>
<column name="SORTINGDIRECTION" value="ASC"/>
</insert>
<insert tableName="AB_KEYWORD_ENTRY">
<column name="AB_KEYWORD_ENTRYID" value="f4831eb4-276d-4625-ac38-d3238a306f4d"/>
<column name="AB_KEYWORD_CATEGORY_ID" value="be28e8a4-08d4-4697-b248-8b97b4e6e749"/>
<column name="KEYID" value="NEWSLETTER"/>
<column name="TITLE" value="Newsletter"/>
<column name="CONTAINER" value="MosaicoTemplateCategory"/>
<column name="SORTING" valueNumeric="1"/>
<column name="ISACTIVE" valueNumeric="1"/>
<column name="ISESSENTIAL" valueNumeric="0"/>
</insert>
<insert tableName="AB_KEYWORD_ENTRY">
<column name="AB_KEYWORD_ENTRYID" value="b5353b07-248f-4818-96d8-171f7bac18d9"/>
<column name="AB_KEYWORD_CATEGORY_ID" value="be28e8a4-08d4-4697-b248-8b97b4e6e749"/>
<column name="KEYID" value="INVITATION"/>
<column name="TITLE" value="Invitation"/>
<column name="CONTAINER" value="MosaicoTemplateCategory"/>
<column name="SORTING" valueNumeric="2"/>
<column name="ISACTIVE" valueNumeric="1"/>
<column name="ISESSENTIAL" valueNumeric="0"/>
</insert>
<insert tableName="AB_KEYWORD_ENTRY">
<column name="AB_KEYWORD_ENTRYID" value="71a04a08-e1e1-4512-ae61-a51a3de9a645"/>
<column name="AB_KEYWORD_CATEGORY_ID" value="be28e8a4-08d4-4697-b248-8b97b4e6e749"/>
<column name="KEYID" value="ACTIONMAIL"/>
<column name="TITLE" value="Action mail"/>
<column name="CONTAINER" value="MosaicoTemplateCategory"/>
<column name="SORTING" valueNumeric="3"/>
<column name="ISACTIVE" valueNumeric="1"/>
<column name="ISESSENTIAL" valueNumeric="0"/>
</insert>
<insert tableName="AB_KEYWORD_ENTRY">
<column name="AB_KEYWORD_ENTRYID" value="6c6a9e60-e72e-4f38-8d51-b01674f9953f"/>
<column name="AB_KEYWORD_CATEGORY_ID" value="be28e8a4-08d4-4697-b248-8b97b4e6e749"/>
<column name="KEYID" value="TECHNICALEMAIL"/>
<column name="TITLE" value="Technical email"/>
<column name="CONTAINER" value="MosaicoTemplateCategory"/>
<column name="SORTING" valueNumeric="4"/>
<column name="ISACTIVE" valueNumeric="1"/>
<column name="ISESSENTIAL" valueNumeric="0"/>
</insert>
</changeSet>
</databaseChangeLog>
\ No newline at end of file
......@@ -4,4 +4,5 @@
<include relativeToChangelogFile="true" file="TopicTree/changelog.xml"/>
<include relativeToChangelogFile="true" file="CampaignStep/changelog.xml"/>
<include relativeToChangelogFile="true" file="xRM-Service/changelog.xml"/>
</databaseChangeLog>
\ No newline at end of file
<include relativeToChangelogFile="true" file="Mosaico/changelog.xml"/>
</databaseChangeLog>
......@@ -5515,8 +5515,8 @@
<dbName></dbName>
<primaryKey v="false" />
<columnType v="93" />
<size v="19" />
<scale v="0" />
<size v="29" />
<scale v="9" />
<notNull v="false" />
<isUnique v="false" />
<index v="false" />
......@@ -5608,7 +5608,7 @@
<name>DESCRIPTION</name>
<dbName></dbName>
<primaryKey v="false" />
<columnType v="-1" />
<columnType v="2005" />
<size v="2147483647" />
<scale v="0" />
<notNull v="false" />
......@@ -5710,8 +5710,8 @@
<dbName></dbName>
<primaryKey v="false" />
<columnType v="93" />
<size v="19" />
<scale v="0" />
<size v="29" />
<scale v="9" />
<notNull v="false" />
<isUnique v="false" />
<index v="false" />
......@@ -11219,6 +11219,34 @@
<title></title>
<description></description>
</entityFieldDb>
<entityFieldDb>
<name>MOSAICOTEMPLATE_ID</name>
<dbName></dbName>
<primaryKey v="false" />
<columnType v="1" />
<size v="36" />
<scale v="0" />
<notNull v="false" />
<isUnique v="false" />
<index v="false" />
<documentation></documentation>
<title></title>
<description></description>
</entityFieldDb>
<entityFieldDb>
<name>ISOLANGUAGE</name>
<dbName></dbName>
<primaryKey v="false" />
<columnType v="1" />
<size v="3" />
<scale v="0" />
<notNull v="false" />
<isUnique v="false" />
<index v="false" />
<documentation></documentation>
<title></title>
<description></description>
</entityFieldDb>
</entityFields>
</entityDb>
<entityDb>
......@@ -27400,6 +27428,180 @@
</entityFieldDb>
</entityFields>
</entityDb>
<entityDb>
<name>MOSAICOTEMPLATE</name>
<dbName></dbName>
<idColumn>MOSAICOTEMPLATEID</idColumn>
<idGeneratorType v="0" />
<idGeneratorInterval v="1" />
<documentation></documentation>
<title></title>
<description></description>
<auditSyncConfig>
<name>auditSyncConfig</name>
<auditMode v="0" />
<syncActive v="false" />
<syncComplete v="true" />
<syncDirection v="1" />
<syncIds></syncIds>
</auditSyncConfig>
<entityFields>
<entityFieldDb>
<name>DATE_EDIT</name>
<dbName></dbName>
<primaryKey v="false" />
<columnType v="93" />
<size v="19" />
<scale v="0" />
<notNull v="false" />
<isUnique v="false" />
<index v="false" />
<documentation></documentation>
<title></title>
<description></description>
</entityFieldDb>
<entityFieldDb>
<name>MOSAICOTEMPLATEID</name>
<dbName></dbName>
<primaryKey v="true" />
<columnType v="1" />
<size v="36" />
<scale v="0" />
<notNull v="true" />
<isUnique v="true" />
<index v="true" />
<documentation></documentation>
<title></title>
<description></description>
</entityFieldDb>
<entityFieldDb>
<name>CONTENT</name>
<dbName></dbName>
<primaryKey v="false" />
<columnType v="-1" />
<size v="2147483647" />
<scale v="0" />
<notNull v="false" />
<isUnique v="false" />
<index v="false" />
<documentation></documentation>
<title></title>
<description></description>
</entityFieldDb>
<entityFieldDb>
<name>DATE_NEW</name>
<dbName></dbName>
<primaryKey v="false" />
<columnType v="93" />
<size v="19" />
<scale v="0" />
<notNull v="true" />
<isUnique v="false" />
<index v="false" />
<documentation></documentation>
<title></title>
<description></description>
</entityFieldDb>
<entityFieldDb>
<name>USER_NEW</name>
<dbName></dbName>
<primaryKey v="false" />
<columnType v="12" />
<size v="50" />
<scale v="0" />
<notNull v="true" />
<isUnique v="false" />
<index v="false" />
<documentation></documentation>
<title></title>
<description></description>
</entityFieldDb>
<entityFieldDb>
<name>METADATA</name>
<dbName></dbName>
<primaryKey v="false" />
<columnType v="-1" />
<size v="2147483647" />
<scale v="0" />
<notNull v="false" />
<isUnique v="false" />
<index v="false" />
<documentation></documentation>
<title></title>
<description></description>
</entityFieldDb>
<entityFieldDb>
<name>USER_EDIT</name>
<dbName></dbName>
<primaryKey v="false" />
<columnType v="12" />
<size v="50" />
<scale v="0" />
<notNull v="false" />
<isUnique v="false" />
<index v="false" />
<documentation></documentation>
<title></title>
<description></description>
</entityFieldDb>
<entityFieldDb>
<name>NAME</name>
<dbName></dbName>
<primaryKey v="false" />
<columnType v="12" />
<size v="250" />
<scale v="0" />
<notNull v="true" />
<isUnique v="false" />
<index v="false" />
<documentation></documentation>
<title></title>
<description></description>
</entityFieldDb>
<entityFieldDb>
<name>BASETEMPLATE</name>
<dbName></dbName>
<primaryKey v="false" />
<columnType v="1" />
<size v="36" />
<scale v="0" />
<notNull v="false" />
<isUnique v="false" />
<index v="false" />
<documentation></documentation>
<title></title>
<description></description>
</entityFieldDb>
<entityFieldDb>
<name>ISOLANGUAGE</name>
<dbName></dbName>
<primaryKey v="false" />
<columnType v="1" />
<size v="3" />
<scale v="0" />
<notNull v="false" />
<isUnique v="false" />
<index v="false" />
<documentation></documentation>
<title></title>
<description></description>
</entityFieldDb>
<entityFieldDb>
<name>CATEGORY</name>
<dbName></dbName>
<primaryKey v="false" />
<columnType v="1" />
<size v="36" />
<scale v="0" />
<notNull v="false" />
<isUnique v="false" />
<index v="false" />
<documentation></documentation>
<title></title>
<description></description>
</entityFieldDb>
</entityFields>
</entityDb>
</entities>
</entityGroup>
</aliasDefDb>
......
......@@ -230,6 +230,10 @@
<name>EmailFilterHandling</name>
<kind v="10077" />
</entityNode>
<entityNode>
<name>MosaicoTemplate</name>
<kind v="10077" />
</entityNode>
</childNodes>
</entityNode>
<entityNode>
......
<?xml version="1.0" encoding="UTF-8"?>
<entity xmlns="http://www.adito.de/2018/ao/Model" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" VERSION="1.3.22" xsi:schemaLocation="http://www.adito.de/2018/ao/Model adito://models/xsd/entity/1.3.22">
<name>BulkMailAddMosaico_entity</name>
<majorModelMode>DISTRIBUTED</majorModelMode>
<recordContainer>recordContainer</recordContainer>
<entityFields>
<entityProvider>
<name>#PROVIDER</name>
</entityProvider>
<entityProvider>
<name>#PROVIDER_AGGREGATES</name>
<useAggregates v="true" />
</entityProvider>
<entityField>
<name>BASETEMPLATE</name>
<documentation>%aditoprj%/entity/BulkMailAddMosaico_entity/entityfields/basetemplate/documentation.adoc</documentation>
<title>Base Template</title>
<consumer>BaseTemplates</consumer>
<mandatory v="true" />
<state>EDITABLE</state>
</entityField>
<entityField>
<name>MOSAICOTEMPLATE_ID</name>
<title>Copy template</title>
<consumer>MosaicoTemplates</consumer>
<state>EDITABLE</state>
<onValueChange>%aditoprj%/entity/BulkMailAddMosaico_entity/entityfields/mosaicotemplate_id/onValueChange.js</onValueChange>
</entityField>
<entityConsumer>
<name>BaseTemplates</name>
<dependency>
<name>dependency</name>
<entityName>KeywordEntry_entity</entityName>
<fieldName>SpecificContainerKeywords</fieldName>
</dependency>
<children>
<entityParameter>
<name>ContainerName_param</name>
<valueProcess>%aditoprj%/entity/BulkMailAddMosaico_entity/entityfields/basetemplates/children/containername_param/valueProcess.js</valueProcess>
</entityParameter>
</children>
</entityConsumer>
<entityConsumer>
<name>MosaicoTemplates</name>
<dependency>
<name>dependency</name>
<entityName>MosaicoTemplate_entity</entityName>
<fieldName>#PROVIDER</fieldName>
</dependency>
</entityConsumer>
<entityField>
<name>NAME</name>
<title>Name</title>
<mandatory v="true" />
<state>EDITABLE</state>
</entityField>
<entityActionField>
<name>createAndOpen</name>
<title>Create and open in editor</title>
<onActionProcess>%aditoprj%/entity/BulkMailAddMosaico_entity/entityfields/createandopen/onActionProcess.js</onActionProcess>
<stateProcess>%aditoprj%/entity/BulkMailAddMosaico_entity/entityfields/createandopen/stateProcess.js</stateProcess>
</entityActionField>
<entityParameter>
<name>BulkMailId_param</name>
<expose v="true" />
</entityParameter>
<entityField>
<name>ISOLANGUAGE</name>
<title>Language</title>
<consumer>Languages</consumer>
<mandatory v="true" />
<state>EDITABLE</state>
</entityField>
<entityField>
<name>CATEGORY</name>
<title>Classification</title>
<consumer>KeywordMosaicoTemplateCategory</consumer>
<mandatory v="true" />
<state>EDITABLE</state>
</entityField>
<entityConsumer>
<name>KeywordMosaicoTemplateCategory</name>
<dependency>
<name>dependency</name>
<entityName>KeywordEntry_entity</entityName>
<fieldName>SpecificContainerKeywords</fieldName>
</dependency>
<children>
<entityParameter>
<name>ContainerName_param</name>
<valueProcess>%aditoprj%/entity/BulkMailAddMosaico_entity/entityfields/keywordmosaicotemplatecategory/children/containername_param/valueProcess.js</valueProcess>
</entityParameter>
</children>
</entityConsumer>
<entityConsumer>
<name>Languages</name>
<dependency>
<name>dependency</name>
<entityName>Language_entity</entityName>
<fieldName>ISO3Name</fieldName>
</dependency>
</entityConsumer>
</entityFields>
<recordContainers>
<datalessRecordContainer>
<name>recordContainer</name>
<alias>Data_alias</alias>
</datalessRecordContainer>
</recordContainers>
</entity>
import("KeywordRegistry_basic");
import("system.result");
result.string($KeywordRegistry.mosaicoBaseTemplate());
\ No newline at end of file
import("MosaicoTemplate_lib");
import("system.neon");
import("system.util");
import("system.vars");
import("system.entities")
var fieldValues = {};
if (vars.get("$field.MOSAICOTEMPLATE_ID"))
{
var loadConfig = entities.createConfigForLoadingRows()
.entity("MosaicoTemplate_entity")
.fields(["CONTENT","METADATA"])
.uid(vars.get("$field.MOSAICOTEMPLATE_ID"));
fieldValues = entities.getRow(loadConfig);
}
var createdMosaicoTemplateId = util.getNewUUID();
fieldValues.BASETEMPLATE = vars.get("$field.BASETEMPLATE");
fieldValues.NAME = vars.get("$field.NAME");
fieldValues.MOSAICOTEMPLATEID = createdMosaicoTemplateId;
fieldValues.ISOLANGUAGE = vars.get("$field.ISOLANGUAGE");
fieldValues.CATEGORY = vars.get("$field.CATEGORY");
var createConfig = entities.createConfigForAddingRows()
.entity("MOSAICOTEMPLATE_ENTITY")
.fieldValues(fieldValues)
.addParameter("CopyMosaicoTemplateIdParam", vars.get("$field.MOSAICOTEMPLATE_ID"));
entities.createRow(createConfig);
var updateConfig = entities.createConfigForUpdatingRows()
.entity("Bulkmail_entity")
.fieldValues({"MOSAICOTEMPLATE_ID": createdMosaicoTemplateId})
.uid(vars.get("$param.BulkMailId_param"));
entities.updateRow(updateConfig);
MosaicoUtils.openInMosaico(createdMosaicoTemplateId);
neon.closeImage(vars.get("$sys.currentimage"), true);
\ No newline at end of file
import("system.neon");
import("system.result");
import("system.vars");
if (vars.get("$sys.validationerrors"))
{
result.string(neon.COMPONENTSTATE_DISABLED);
}
else
{
result.string(neon.COMPONENTSTATE_EDITABLE);
}
import("system.result");
import("KeywordRegistry_basic")
result.string($KeywordRegistry.mosaicoTemplateCategory());
\ No newline at end of file
import("system.neon");
import("system.vars");
import("system.entities");
if (vars.get("$this.value"))
{
var config = entities.createConfigForLoadingRows()
.entity("MosaicoTemplate_entity")
.fields(["BASETEMPLATE","BASETEMPLATE.displayValue","ISOLANGUAGE","ISOLANGUAGE.displayValue","CATEGORY","CATEGORY.displayValue"])
.uid(vars.get("$this.value"));
var fieldValues = entities.getRow(config);
fieldValues = Object.keys(fieldValues).reduce(function (pAccumulator, pFieldName)
{
pAccumulator["$field."+pFieldName] = fieldValues[pFieldName];
return pAccumulator;
},{});
neon.setFieldValues(fieldValues);
}
\ No newline at end of file
......@@ -42,6 +42,7 @@
<title>Document Template</title>
<consumer>Templates</consumer>
<mandatory v="false" />
<stateProcess>%aditoprj%/entity/BulkMail_entity/entityfields/documenttemplate_id/stateProcess.js</stateProcess>
<onValueChange>%aditoprj%/entity/BulkMail_entity/entityfields/documenttemplate_id/onValueChange.js</onValueChange>
<onValueChangeTypes>
<element>MASK</element>
......@@ -364,14 +365,12 @@
</entityField>
<entityField>
<name>DATE_NEW</name>
<title>Created on</title>
<contentType>DATE</contentType>
<valueProcess>%aditoprj%/entity/BulkMail_entity/entityfields/date_new/valueProcess.js</valueProcess>
</entityField>
<entityField>
<name>recipientCount</name>
<title>Recipients</title>
<contentType>NUMBER</contentType>
</entityField>
<entityField>
<name>deliveredMailCount</name>
......@@ -385,7 +384,6 @@
<name>EMPLOYEE_CONTACT_ID</name>
<title>Person in charge</title>
<consumer>Employees</consumer>
<groupable v="true" />
<linkedContext>Person</linkedContext>
<valueProcess>%aditoprj%/entity/BulkMail_entity/entityfields/employee_contact_id/valueProcess.js</valueProcess>
<displayValueProcess>%aditoprj%/entity/BulkMail_entity/entityfields/employee_contact_id/displayValueProcess.js</displayValueProcess>
......@@ -482,6 +480,58 @@
</entityParameter>
</children>
</entityConsumer>
<entityField>
<name>DATE_EDIT</name>
<title>Edited on</title>
<contentType>DATE</contentType>
<valueProcess>%aditoprj%/entity/BulkMail_entity/entityfields/date_edit/valueProcess.js</valueProcess>
</entityField>
<entityField>
<name>USER_NEW</name>
<title>Creator</title>
<valueProcess>%aditoprj%/entity/BulkMail_entity/entityfields/user_new/valueProcess.js</valueProcess>
</entityField>
<entityField>
<name>USER_EDIT</name>
<title>Editor</title>
<valueProcess>%aditoprj%/entity/BulkMail_entity/entityfields/user_edit/valueProcess.js</valueProcess>
</entityField>
<entityParameter>
<name>PresetRecipientsContext_param</name>
<expose v="true" />
<documentation>%aditoprj%/entity/BulkMail_entity/entityfields/presetrecipientscontext_param/documentation.adoc</documentation>
</entityParameter>
<entityParameter>
<name>PresetRecipientsFilter_param</name>
<expose v="true" />
<documentation>%aditoprj%/entity/BulkMail_entity/entityfields/presetrecipientsfilter_param/documentation.adoc</documentation>
</entityParameter>
<entityField>
<name>firstSendDate</name>
<title>Send Date</title>
<contentType>DATE</contentType>
</entityField>
<entityParameter>
<name>CreateFromMosaicoTemplateId_param</name>
<expose v="true" />
</entityParameter>
<entityField>
<name>MOSAICOTEMPLATE_ID</name>
<title>Mosaico template</title>
<consumer>MosaicoTemplates</consumer>
<stateProcess>%aditoprj%/entity/BulkMail_entity/entityfields/mosaicotemplate_id/stateProcess.js</stateProcess>
<valueProcess>%aditoprj%/entity/BulkMail_entity/entityfields/mosaicotemplate_id/valueProcess.js</valueProcess>
<displayValueProcess>%aditoprj%/entity/BulkMail_entity/entityfields/mosaicotemplate_id/displayValueProcess.js</displayValueProcess>
<onValueChange>%aditoprj%/entity/BulkMail_entity/entityfields/mosaicotemplate_id/onValueChange.js</onValueChange>
</entityField>
<entityConsumer>
<name>MosaicoTemplates</name>
<dependency>
<name>dependency</name>
<entityName>MosaicoTemplate_entity</entityName>
<fieldName>#PROVIDER</fieldName>
</dependency>
</entityConsumer>
<entityActionGroup>
<name>observeActionoGroup</name>
<children>
......@@ -529,6 +579,20 @@
<onActionProcess>%aditoprj%/entity/BulkMail_entity/entityfields/copybulkmail/onActionProcess.js</onActionProcess>
<iconId>VAADIN:COPY</iconId>
</entityActionField>
<entityActionField>
<name>openInMosaico</name>
<title>Open in mosaico</title>
<onActionProcess>%aditoprj%/entity/BulkMail_entity/entityfields/openinmosaico/onActionProcess.js</onActionProcess>
<iconId>NEON:WRENCH</iconId>
<stateProcess>%aditoprj%/entity/BulkMail_entity/entityfields/openinmosaico/stateProcess.js</stateProcess>
</entityActionField>
<entityActionField>
<name>newMosaicoTemplate</name>
<title>Open new mosaico template</title>
<onActionProcess>%aditoprj%/entity/BulkMail_entity/entityfields/newmosaicotemplate/onActionProcess.js</onActionProcess>
<iconId>VAADIN:TOOLS</iconId>
<stateProcess>%aditoprj%/entity/BulkMail_entity/entityfields/newmosaicotemplate/stateProcess.js</stateProcess>
</entityActionField>
<entityActionField>
<name>openAdminView</name>
<title>Open admin view</title>
......@@ -536,43 +600,12 @@
<iconId>VAADIN:CURLY_BRACKETS</iconId>
<stateProcess>%aditoprj%/entity/BulkMail_entity/entityfields/openadminview/stateProcess.js</stateProcess>
</entityActionField>
<entityActionField>
<name>openMosaico</name>
<title>Open Mosaico</title>
<onActionProcess>%aditoprj%/entity/BulkMail_entity/entityfields/openmosaico/onActionProcess.js</onActionProcess>
<iconId>NEON:WRENCH</iconId>
<stateProcess>%aditoprj%/entity/BulkMail_entity/entityfields/openmosaico/stateProcess.js</stateProcess>
</entityActionField>
<entityField>
<name>DATE_EDIT</name>
<title>Edited on</title>
<contentType>DATE</contentType>
<valueProcess>%aditoprj%/entity/BulkMail_entity/entityfields/date_edit/valueProcess.js</valueProcess>
</entityField>
<entityField>
<name>USER_NEW</name>
<title>Creator</title>
<valueProcess>%aditoprj%/entity/BulkMail_entity/entityfields/user_new/valueProcess.js</valueProcess>
</entityField>
<entityField>
<name>USER_EDIT</name>
<title>Editor</title>
<valueProcess>%aditoprj%/entity/BulkMail_entity/entityfields/user_edit/valueProcess.js</valueProcess>
</entityField>
<entityParameter>
<name>PresetRecipientsContext_param</name>
<expose v="true" />
<documentation>%aditoprj%/entity/BulkMail_entity/entityfields/presetrecipientscontext_param/documentation.adoc</documentation>
</entityParameter>
<entityParameter>
<name>PresetRecipientsFilter_param</name>
<expose v="true" />
<documentation>%aditoprj%/entity/BulkMail_entity/entityfields/presetrecipientsfilter_param/documentation.adoc</documentation>
</entityParameter>
<entityField>
<name>firstSendDate</name>
<title>Send Date</title>
<contentType>DATE</contentType>
<name>ISOLANGUAGE</name>
<title>Language</title>
<consumer>Languages</consumer>
<valueProcess>%aditoprj%/entity/BulkMail_entity/entityfields/isolanguage/valueProcess.js</valueProcess>
<displayValueProcess>%aditoprj%/entity/BulkMail_entity/entityfields/isolanguage/displayValueProcess.js</displayValueProcess>
</entityField>
<entityField>
<name>dateLastEdit</name>
......@@ -589,6 +622,14 @@
<name>BULKMAIL_OBJECTTYPE</name>
<valueProcess>%aditoprj%/entity/BulkMail_entity/entityfields/bulkmail_objecttype/valueProcess.js</valueProcess>
</entityField>
<entityConsumer>
<name>Languages</name>
<dependency>
<name>dependency</name>
<entityName>Language_entity</entityName>
<fieldName>ISO3Name</fieldName>
</dependency>
</entityConsumer>
</entityFields>
<recordContainers>
<dbRecordContainer>
......@@ -687,7 +728,6 @@
<dbRecordFieldMapping>
<name>recipientCount.value</name>
<expression>%aditoprj%/entity/BulkMail_entity/recordcontainers/db/recordfieldmappings/recipientcount.value/expression.js</expression>
<isFilterable v="true" />
</dbRecordFieldMapping>
<dbRecordFieldMapping>
<name>bounceCount.value</name>
......@@ -724,6 +764,15 @@
<name>USER_NEW.value</name>
<recordfield>BULKMAIL.USER_NEW</recordfield>
</dbRecordFieldMapping>
<dbRecordFieldMapping>
<name>MOSAICOTEMPLATE_ID.value</name>
<recordfield>BULKMAIL.MOSAICOTEMPLATE_ID</recordfield>
</dbRecordFieldMapping>
<dbRecordFieldMapping>
<name>MOSAICOTEMPLATE_ID.displayValue</name>
<recordfield>MOSAICOTEMPLATE.NAME</recordfield>
<expression>%aditoprj%/entity/BulkMail_entity/recordcontainers/db/recordfieldmappings/mosaicotemplate_id.displayvalue/expression.js</expression>
</dbRecordFieldMapping>
<dbRecordFieldMapping>
<name>firstSendDate.value</name>
<expression>%aditoprj%/entity/BulkMail_entity/recordcontainers/db/recordfieldmappings/firstsenddate.value/expression.js</expression>
......@@ -739,22 +788,38 @@
<expression>%aditoprj%/entity/BulkMail_entity/recordcontainers/db/recordfieldmappings/userlastedit.value/expression.js</expression>
<isFilterable v="true" />
</dbRecordFieldMapping>
<dbRecordFieldMapping>
<name>ISOLANGUAGE.value</name>
<recordfield>BULKMAIL.ISOLANGUAGE</recordfield>
<isFilterable v="true" />
</dbRecordFieldMapping>
<dbRecordFieldMapping>
<name>ISOLANGUAGE.displayValue</name>
<expression>%aditoprj%/entity/BulkMail_entity/recordcontainers/db/recordfieldmappings/isolanguage.displayvalue/expression.js</expression>
</dbRecordFieldMapping>
</recordFieldMappings>
<linkInformation>
<linkInformation>
<name>6444866d-42ee-4b7b-8536-6dc8f6437c45</name>
<name>453f760a-71eb-45d4-bedd-f939d3f87f84</name>
<tableName>BULKMAIL</tableName>
<primaryKey>BULKMAILID</primaryKey>
<isUIDTable v="true" />
<readonly v="false" />
</linkInformation>
<linkInformation>
<name>914d6373-4409-44e5-882a-3f795b196d7b</name>
<name>ca336008-563a-4550-84b0-b812707cd3d0</name>
<tableName>DOCUMENTTEMPLATE</tableName>
<primaryKey>DOCUMENTTEMPLATEID</primaryKey>
<isUIDTable v="false" />
<readonly v="true" />
</linkInformation>
<linkInformation>
<name>04b5f582-de36-43ab-bf2d-7b73a776772e</name>
<tableName>MOSAICOTEMPLATE</tableName>
<primaryKey>MOSAICOTEMPLATEID</primaryKey>
<isUIDTable v="false" />
<readonly v="true" />
</linkInformation>
</linkInformation>
<filterExtensions>
<filterExtension>
......
......@@ -22,7 +22,9 @@ if (!vars.exists("$context.dataCopied") && vars.get("$param.CopyBulkMailId_param
"TESTING_CONTACT_ID",
"TESTING_EMAIL_ADDRESS",
"USE_TEMPLATE_ATTACHMENTS",
"INTEREST_ID"
"INTEREST_ID",
"MOSAICOTEMPLATE_ID",
"ISOLANGUAGE"
])
.uid(vars.get("$param.CopyBulkMailId_param"));
......
......@@ -2,9 +2,10 @@ import("system.result");
import("Bulkmail_lib");
import("system.vars");
var template;
if (vars.get("$param.CopyBulkMailId_param") && vars.get("$this.value") == null)
{
var template = BulkMailUtils.getBulkMailTemplate(vars.get("$param.CopyBulkMailId_param"), "", false, false)
template = BulkMailUtils.getBulkMailTemplate(vars.get("$param.CopyBulkMailId_param"), "", false, false)
result.string([template.filename, template.content, template.mimeType].join(";"));
}
......@@ -10,11 +10,12 @@ import("Bulkmail_lib");
/* Processes that can also set the value of this field:
* - bindata.onValueChange
* - DOCUMENTTEMPLATE_ID.onValueChange
* - MOSAICOTEMPLATE_ID.onValueChange
*/
if (vars.get("$sys.viewmode") == neon.FRAME_VIEWMODE_DATASET && vars.get("$this.value") == null)
{
var template = BulkMailUtils.getBulkMailTemplate(vars.get("$field.BULKMAILID"), vars.get("$field.DOCUMENTTEMPLATE_ID"), false, false, new FileUpload(vars.get("$field.bindata")));
var template = BulkMailUtils.getBulkMailTemplate(vars.get("$field.BULKMAILID"), vars.get("$field.DOCUMENTTEMPLATE_ID"), false, false, new FileUpload(vars.get("$field.bindata")), vars.get("$field.MOSAICOTEMPLATE_ID"));
if (template && template.type)
{
var content = util.decodeBase64String(template.content);
......
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