Skip to content
Snippets Groups Projects
Commit 6df79b25 authored by S.Listl's avatar S.Listl
Browse files

Letter docx fix

parent e9dcac1e
No related branches found
No related tags found
No related merge requests found
......@@ -4,4 +4,5 @@ import("system.vars");
var contactIds = JSON.parse(vars.getString("$field.recipientContactIds"));
var bulkMailId = vars.get("$field.BULKMAIL_ID");
BulkMailUtils.addRecipients(bulkMailId, contactIds);
\ No newline at end of file
BulkMailUtils.addRecipients(bulkMailId, contactIds);
BulkMailUtils.openBulkMail(bulkMailId);
\ No newline at end of file
......@@ -11,6 +11,7 @@
<name>SERIALLETTER_ID</name>
<title>Serial letter</title>
<consumer>SerialLetters</consumer>
<mandatory v="true" />
</entityField>
<entityField>
<name>UID</name>
......
......@@ -5,3 +5,4 @@ var contactIds = JSON.parse(vars.getString("$field.recipientContactIds"));
var letterId = vars.get("$field.SERIALLETTER_ID");
SerialLetterUtils.addRecipients(letterId, contactIds);
SerialLetterUtils.openSerialLetter(letterId);
\ No newline at end of file
......@@ -247,7 +247,7 @@ BulkMailUtils.filterNewRecipients = function (pBulkMailId, pContactIds)
BulkMailUtils.openBulkMail = function (pBulkMailId)
{
neon.openContext("BulkMail", "BulkMailMain_view", [pBulkMailId], neon.OPERATINGSTATE_NEW, null);
neon.openContext("BulkMail", "BulkMailMain_view", [pBulkMailId], neon.OPERATINGSTATE_VIEW, null);
}
function SerialLetterUtils () {}
......@@ -304,4 +304,9 @@ SerialLetterUtils.isRecipient = function (pSerialLetterId, pContactId)
.andPrepare("LETTERRECIPIENT.SERIALLETTER_ID", pSerialLetterId)
.buildSql("select count(*) from LETTERRECIPIENT") //TODO: is there a way exists could be used?
) != "0";
}
SerialLetterUtils.openSerialLetter = function (pSerialLetterId)
{
neon.openContext("SerialLetter", "SerialLetterMain_view", [pSerialLetterId], neon.OPERATINGSTATE_VIEW, null);
}
\ No newline at end of file
......@@ -485,7 +485,7 @@ TemplateHelper._getReplacedDOCX = function (pTemplate, pReplacements)
{
var replacements = {};
for (let placeholder in pReplacements) //removes the prefix and postfix, the process needs it like this
replacements[placeholder.slice(3, -3)] = pReplacements[placeholder];
replacements[placeholder.slice(2, -2)] = pReplacements[placeholder];
//this is executed as a process because of better performance
var documentData = process.execute("getDocxDocument_serverProcess", {
......
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