13.03.2021, 00:13 | #1 |
Участник
|
ax.docentric: Comment on Improved Email Templates – Creating Email Body with Dynamic Table by Ana Gligorijevic
Источник: https://ax.docentric.com/improved-em.../#comment-2123
============== In reply to VardhaRaj.Hi,Before creating and sending an email message, you can check if there is no data (lines) used for populating the dynamic table in the email template, so in that case you can use a different email template without the dynamic table.Alternatively, you can create a pre-event handler for the DocEmailTemplateManager::generateEmailBodyAndSubjectWithDynamicLines() method and pre-process the email body with placeholders as a string containing HTML to remove the empty HTML table. This code could look like this:const str repeatingBlockMarkStart = '<!‐‐%HIDDEN_TABLEBEGIN%‐‐>';const str repeatingBlockMarkEnd = '<!‐‐%HIDDEN_TABLEEND%‐‐>'; int posBegin = strScan(_emailBodyWithPlaceholders, repeatingBlockMarkStart, 1, strLen(_emailBodyWithPlaceholders));int posEnd = strScan(_emailBodyWithPlaceholders, repeatingBlockMarkEnd, 1, strLen(_emailBodyWithPlaceholders)) + strLen(repeatingBlockMarkEnd); if ((posEnd - posBegin) > strLen(repeatingBlockMarkStart) + strLen(repeatingBlockMarkEnd)){ emailBody_FirstPart = subStr(_emailBodyWithPlaceholders, 1, posBegin - 1); emailBody_LastPart = subStr(_emailBodyWithPlaceholders, posEnd, strLen(_emailBodyWithPlaceholders)); newEmailBody = emailBody_FirstPart + '<BR>' + emailBody_LastPart;} Hope that this helps.Kind regards,Ana Источник: https://ax.docentric.com/improved-em.../#comment-2123
__________________
Расскажите о новых и интересных блогах по Microsoft Dynamics, напишите личное сообщение администратору. |
|
13.03.2021, 00:13 | #2 |
Участник
|
ax.docentric: Comment on Improved Email Templates – Creating Email Body with Dynamic Table by VardhaRaj
Источник: https://ax.docentric.com/improved-em.../#comment-2121
============== Hi Team,How can I hide the dynamic table when there is no data in it?Example:The dynamic table has 0 rows, but it still shows the header and values as zero. I need to hide the table when there is no data. Источник: https://ax.docentric.com/improved-em.../#comment-2121
__________________
Расскажите о новых и интересных блогах по Microsoft Dynamics, напишите личное сообщение администратору. |
|