Skip to content
Snippets Groups Projects
Commit 8427ca57 authored by Benjamin Ulrich's avatar Benjamin Ulrich :speech_balloon:
Browse files

Merge branch 'sales_2002475_offer_email_filename' into '2021.2'

[Projekt: xRM-Sales][TicketNr.: 2002475][Titel des pdf eines Angebots beim...

See merge request xrm/basic!1507
parents 87066f96 dd332cbf
No related branches found
No related tags found
No related merge requests found
import("Util_lib");
import("system.db");
import("system.vars");
import("system.question");
......@@ -20,13 +21,18 @@ var additionalPlaceholders = [
new Placeholder("offerCode", Placeholder.types.FIXEDVALUE, vars.get("$field.FullOfferCode"))
];
if (vars.get("$field.CONTACT_ID") == null || "") contactId = vars.get("$field.CONTACT_ORG_ID");
if (Utils.isNullOrEmptyString(vars.get("$field.CONTACT_ID")))
{
contactId = vars.get("$field.CONTACT_ORG_ID");
}
offerReport.content = arrayReport[1];
offerReport.mimeType = MimeTypes.PDF();
offerReport.filename = translate.text("Offer No.") + vars.get("$field.#CONTENTTITLE") + ".pdf";
offerReport.filename = translate.text("Offer No.") + vars.get("$field.OfferCode_VersNr_fieldgroup") + ".pdf";
attachmentArray[0] = offerReport;
EmailWritingUtils.sendReportAsMail(contactId, attachmentArray, "Offer", notificationMsg, emailFilename, additionalPlaceholders, updateStatements,
$KeywordRegistry.documentTemplateTypeCategory$single());
EmailWritingUtils.sendReportAsMail(
contactId, attachmentArray, "Offer", notificationMsg, emailFilename, additionalPlaceholders, updateStatements,
$KeywordRegistry.documentTemplateTypeCategory$single()
);
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