Skip to content
Snippets Groups Projects
Commit d32220ce authored by Sascha Schmidt's avatar Sascha Schmidt
Browse files

[Projekt: xRM-ContactManagement][TicketNr.: 1082514][Mit Klick auf die...

[Projekt: xRM-ContactManagement][TicketNr.: 1082514][Mit Klick auf die E-Mail-Adresse stehen die Vorlagen in der Auswahl nicht zur Verfügung]
parent 252e153f
No related branches found
No related tags found
No related merge requests found
......@@ -345,6 +345,10 @@
<name>CreateFromMosaicoTemplateId_param</name>
<expose v="true" />
</entityParameter>
<entityParameter>
<name>Language_param</name>
<expose v="true" />
</entityParameter>
</entityFields>
<recordContainers>
<dbRecordContainer>
......
......@@ -7,7 +7,8 @@ import("Sql_lib");
var cond = newWhere()
.andIfSet("DOCUMENTTEMPLATE.KIND", "$param.DocumentTemplateType_param")
.andIfSet("DOCUMENTTEMPLATE.CLASSIFICATION", "$param.DocumentTemplateTypeClassification_param");
.andIfSet("DOCUMENTTEMPLATE.CLASSIFICATION", "$param.DocumentTemplateTypeClassification_param")
.andIfSet("DOCUMENTTEMPLATE.ISOLANGUAGE", "$param.Language_param");
if(vars.get("$param.ComingFrom_param"))
{
......
......@@ -39,6 +39,10 @@
<name>DocumentTemplateTypeClassification_param</name>
<valueProcess>%aditoprj%/entity/Email_entity/entityfields/documenttemplates/children/documenttemplatetypeclassification_param/valueProcess.js</valueProcess>
</entityParameter>
<entityParameter>
<name>Language_param</name>
<valueProcess>%aditoprj%/entity/Email_entity/entityfields/documenttemplates/children/language_param/valueProcess.js</valueProcess>
</entityParameter>
</children>
</entityConsumer>
<entityParameter>
......@@ -141,6 +145,10 @@
<expose v="true" />
<description></description>
</entityParameter>
<entityParameter>
<name>Language_param</name>
<expose v="true" />
</entityParameter>
</entityFields>
<recordContainers>
<datalessRecordContainer>
......
import("system.vars");
import("system.result");
result.string(vars.get("$param.Language_param"));
\ No newline at end of file
......@@ -94,10 +94,12 @@ EmailWritingUtils.openMailTemplate = function (pToRecipients, pSenderContactId,
* @param {String} [pAdditionalPlaceholders] additional placeholders for the email
* @param {Array[]} [pUpdateStatements] an array with update statements which will be executed after email is downloaded/sent.
* @param {String} pDocumentTemplateTypeClassification The document template type classification.
* @param {String} pLanguage in ISO3
*/
EmailWritingUtils.openNewMail = function (pToContactId, pToEmailAddress, pComingFrom, pAttachmentArray, pNotificationMsg, pEmailFilename,
pAdditionalPlaceholders, pUpdateStatements, pDocumentTemplateTypeClassification)
pAdditionalPlaceholders, pUpdateStatements, pDocumentTemplateTypeClassification, pLanguage)
{
logging.log(pLanguage);
var params = {
"ContactId_param" : pToContactId,
"Attachments_param" : JSON.stringify(pAttachmentArray),
......@@ -106,7 +108,8 @@ EmailWritingUtils.openNewMail = function (pToContactId, pToEmailAddress, pComing
"EmailFilename" : pEmailFilename,
"AdditionalPlaceholders_param" : JSON.stringify(pAdditionalPlaceholders),
"UpdateStatements_param" : JSON.stringify(pUpdateStatements),
"DocumentTemplateTypeClassification_param" : pDocumentTemplateTypeClassification
"DocumentTemplateTypeClassification_param" : pDocumentTemplateTypeClassification,
"Language_param" : pLanguage
};
if (pToEmailAddress)
......
......@@ -13,11 +13,13 @@ var uid = vars.get("$local.uid");
if (entity == "Communication_entity")
{
var contactId = newSelect("COMMUNICATION.OBJECT_ROWID")
var [contactId, language] = newSelect(["COMMUNICATION.OBJECT_ROWID", "CONTACT.ISOLANGUAGE"])
.from("COMMUNICATION")
.leftJoin("CONTACT", "COMMUNICATION.OBJECT_ROWID = CONTACT.CONTACTID")
.where("COMMUNICATION.COMMUNICATIONID", uid)
.cell();
EmailWritingUtils.openNewMail(contactId, address);
.arrayRow();
EmailWritingUtils.openNewMail(contactId, address, undefined, undefined, undefined, undefined, undefined, undefined, undefined, language);
}
else
neon.openUrl("mailto:" + encodeURIComponent(address), false);
\ 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