Skip to content
Snippets Groups Projects
Commit 60aa89dd authored by Johannes Hörmann's avatar Johannes Hörmann
Browse files

Bulkmail fixes

parent 90f3dc7b
No related branches found
No related tags found
No related merge requests found
......@@ -117,7 +117,6 @@
<entityField>
<name>bindata</name>
<contentType>FILE</contentType>
<stateProcess>%aditoprj%/entity/BulkMail_entity/entityfields/bindata/stateProcess.js</stateProcess>
<onValueChange>%aditoprj%/entity/BulkMail_entity/entityfields/bindata/onValueChange.js</onValueChange>
<onValueChangeTypes>
<element>MASK</element>
......@@ -185,6 +184,7 @@
<title>Contact</title>
<consumer>Contacts</consumer>
<linkedContext>AnyContact</linkedContext>
<displayValueProcess>%aditoprj%/entity/BulkMail_entity/entityfields/testing_contact_id/displayValueProcess.js</displayValueProcess>
</entityField>
<entityField>
<name>TESTING_EMAIL_ADDRESS</name>
......
import("system.vars");
import("system.result");
import("system.neon");
var state = neon.COMPONENTSTATE_EDITABLE;
if (vars.get("$field.DOCUMENTTEMPLATE_ID"))
state = neon.COMPONENTSTATE_INVISIBLE;
result.string(state);
\ No newline at end of file
import("system.result");
import("Document_lib");
import("system.entities");
import("system.neon");
import("system.vars");
if (vars.get("$this.value") == null && vars.get("$sys.recordstate") == neon.OPERATINGSTATE_NEW)
if (!vars.get("$this.value") && vars.get("$sys.recordstate") == neon.OPERATINGSTATE_NEW)
{
var upload = vars.get("$field.bindata");
if (upload)
......@@ -11,4 +12,17 @@ if (vars.get("$this.value") == null && vars.get("$sys.recordstate") == neon.OPER
var filename = DocumentUtil.getFilenameFromUpload(upload);
result.string(filename.split(".")[0]);
}
else
{
var conf = entities.createConfigForLoadingRows();
conf.entity("DocumentTemplate_entity")
.fields(["NAME"])
.uid(vars.get("$field.DOCUMENTTEMPLATE_ID"));
var name = entities.getRows(conf);
if (name.length > 0)
name = name[0].NAME;
result.string(name);
}
}
\ No newline at end of file
import("system.vars");
import("system.result");
import("Contact_lib");
result.string(ContactUtils.getTitleByContactId(vars.get("$field.TESTING_CONTACT_ID")));
\ No newline at end of file
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