Skip to content
Snippets Groups Projects
Commit 5a6f0a9a authored by Sophia Leierseder's avatar Sophia Leierseder
Browse files

download attachments

parent 9e98102a
No related branches found
No related tags found
No related merge requests found
......@@ -47,6 +47,7 @@
<entityParameter>
<name>DocumentId_param</name>
<expose v="true" />
<triggerRecalculation v="true" />
<description>PARAMETER</description>
</entityParameter>
<entityConsumer>
......@@ -81,10 +82,12 @@
<children>
<entityParameter>
<name>DocumentId_param</name>
<expose v="true" />
<triggerRecalculation v="true" />
</entityParameter>
<entityParameter>
<name>Type_param</name>
<expose v="true" />
<triggerRecalculation v="true" />
</entityParameter>
</children>
......@@ -92,7 +95,7 @@
<entityParameter>
<name>Type_param</name>
<expose v="true" />
<triggerRecalculation v="false" />
<triggerRecalculation v="true" />
<description>PARAMETER</description>
</entityParameter>
<entityActionField>
......
import("Document_lib");
DocumentUtil.downloadSelectedDocuments();
\ No newline at end of file
import("system.db");
import("system.vars");
import("system.neon");
import("system.logging");
var fileInformation = db.array(db.ROW, "select ID, FILENAME from ASYS_BINARIES where ROW_ID = '" + vars.get("$field.DOCUMENTTEMPLATE_ID_CHILD") + "'", "_____SYSTEMALIAS");
var data = db.getBinaryContent(fileInformation[0], "_____SYSTEMALIAS");
neon.download(data, fileInformation[1]);
......@@ -175,6 +175,8 @@
<entityProvider>
<name>Attachments</name>
<fieldType>DEPENDENCY_IN</fieldType>
<targetContextField>TARGET_CONTEXT</targetContextField>
<targetIdField>DOCUMENTTEMPLATEID</targetIdField>
<targetConsumerProcess>%aditoprj%/entity/DocumentTemplate_entity/entityfields/attachments/targetConsumerProcess.js</targetConsumerProcess>
<titlePlural>Attachments</titlePlural>
<recordContainer>db</recordContainer>
......@@ -240,6 +242,11 @@
<triggerRecalculation v="true" />
<description>PARAMETER</description>
</entityParameter>
<entityField>
<name>TARGET_CONTEXT</name>
<searchable v="false" />
<valueProcess>%aditoprj%/entity/DocumentTemplate_entity/entityfields/target_context/valueProcess.js</valueProcess>
</entityField>
</entityFields>
<recordContainers>
<dbRecordContainer>
......
import("system.logging");
import("system.db");
import("system.vars");
import("system.result");
import("system.util");
import("Context_lib");
result.string('Document');
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