If you need to send out a single email to every customer each month, and this email needs to have all the customer-belonging invoices for the current billing period attached, check out this article that will describe such a solution for Dynamics 365 for Finance and Operations. You can also download and use the described […]
If we’ve created multiple sales orders for the same customer during one month, he may want to receive a single invoice for all these sales orders at the end of the month (i.e. billing period). Or, he may want to receive a separate invoice for each of his sales orders at the end of the […]
In D365FO you can set up Email templates for sending email notifications for Retail orders, workflows, alerts, etc. With Docentric AX Free Edition you can: use an advanced HTML editor to format email bodies within D365FO, pick a placeholder from a list of available placeholders for the current email, if you need to create a […]
Instead of using the built-in SysEmailTable::sendMail() method for replacing placeholders in an email’s body and subject before sending it, you can use the DocEmailTemplateManager::sendMail() method that offers you more options such as an email body with dynamic tables, multiple email attachments, using Cc and Bcc recipients, etc.
/// Use this method to send an email using the provided built-in email template
/// to the given recipient.
/// <param name = "_emailId">Email Template ID</param>
/// <param name = "_languageId">Language ID</param>
/// <param name = "_emailToAddr">Recipient e-mail address or list of e-mail addresses</param>
/// <param name = "_mappings">
/// Map(PlaceholderName (str) -> PlaceholderValue (str)).
/// This is a map of placeholders and their values used in the dynamic email body.
/// If null, it will be created and filled using the corresponding ETH (Email Template Handler) class.
/// <param name = "_lineMappings">
/// List of Map(PlaceholderName -> PlaceholderValue).
/// This is a list of mappings for each line of the dynamic table within the email body.
/// If null, it will be created and filled using the corresponding ETH class.
/// <param name = "_contextInfo">
/// Context info that can be provided for filling _mappings and _lineMappings
/// with placeholders' values.
/// <param name = "_emailCcAddr">Cc e-mail address(es)</param>
/// <param name = "_emailBccAddr">Bcc e-mail address(es)</param>
/// <param name = "_emailAttachmentFilename">Email attachment filename (optional)</param>
/// <param name = "_emailAttachmentContent">Email attachment file content (optional)</param>
/// <param name = "_emailAdditionalAttachments">
/// Additional email attachments in a form:
/// [ [attachmentName, [content]], [attachmentName, [content]], ...]
public static void sendMail(SysEmailId _emailId, LanguageId _languageId,
Map _mappings = null,
List _lineMappings = null,
container _contextInfo = conNull(),
str _emailCcAddr = '', str _emailBccAddr = '',
str _emailAttachmentFilename = '',
container _emailAttachmentContent = conNull(),
container _emailAdditionalAttachments = conNull())
Let’s see how it works on an […]
In Dynamics 365 for Finance and Operations and Dynamics AX 2102 you can set up Email templates for sending email notifications for Retail orders, workflows, alerts, etc. Often these emails need to include some dynamic information, and this can be achieved using placeholders. However, in order to use placeholders in the built-in editor you need […]