Dynamics Ax 2009, Email Templates

醉酒当歌 提交于 2020-01-11 13:05:10

问题


I have created an email template in Ax, using the %varname% as a placeholder for items added to the map when you send the email with this:

emailParameterMap.insert("modifiedBy", userFullName);
emailParameterMap.insert("vendorName", vendorName);

SysEmailTable::sendMail("VendChanges", "en-us", "user@domain.com", emailParameterMap);

But, I want to have a list of an unknown number of items in the email result that is sent.

How can I do that?


回答1:


You can define your e-mail template with XSLT layout rather than HTML, to render a list of data.

But you will have to write your own code to generate for the XML you pass to SendMail as the _xmlData parameter. And you will of course also have to define the XSLT itself, for transforming the XML.




回答2:


I can't help thinking you will be better off using System.Net.Mail for this. Check out this blog article: http://hiyajac.blogspot.com/2010/06/sending-emails-from-dynamics-ax.html



来源:https://stackoverflow.com/questions/4751261/dynamics-ax-2009-email-templates

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!