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

Serial letter better file name

parent 2eceded6
No related branches found
No related tags found
No related merge requests found
import("Document_lib");
import("system.text");
import("system.translate");
import("Binary_lib");
......@@ -13,11 +14,10 @@ var letterId = vars.get("$local.serialLetterId");
var recipientIds = JSON.parse(vars.get("$local.recipientIds"));
var document = SerialLetterUtils.buildSerialLetter(letterId, recipientIds)
//if (document)
// neon.download(document, template.filename);
SingleBinaryUtils.set("SERIALLETTER", "SERIALLETTERFILE", letterId, document.content, document.filename, "");
var filename = document.title + "." + DocumentUtil.getFileExtensionFromUpload(document.filename);
SingleBinaryUtils.set("SERIALLETTER", "SERIALLETTERFILE", letterId, document.content, filename, "");
var message = translate.text("Download ready");
var description = translate.withArguments("Serial letter \"%0\" can now be downloaded", [document.title]);
......
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