<?xml version="1.0" encoding="utf-8"?>
<?xml-stylesheet type="text/css" href="https://www.schweda.net/style_feed.css" ?>
<rss version="2.0" 
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
    xmlns:atom="http://www.w3.org/2005/Atom"	
	xmlns:dc="http://purl.org/dc/elements/1.1/" > 
<channel>
    <title>schweda.net - Blog</title>
    <link>https://www.schweda.net/</link>
    <description>schweda.net - Blog - Blog-Beitraege</description>
    <language>de-at</language>
    <copyright>Copyright 2006-2026</copyright>
    <generator>schweda.net</generator>
    <managingEditor>heinz.schweda@schweda.net (Heinz Schweda)</managingEditor>
    <webMaster>heinz.schweda@schweda.net (Heinz Schweda)</webMaster>
    <category>Blog</category>
	<atom:link href="https://schweda.net/blog_rss.php?bid=223" rel="self" type="application/rss+xml" />
<item>
<title><![CDATA[Dynamics AX: SysMailerAddressField.appendAddress]]></title>
<description><![CDATA[
<p>In Dynamics AX 4.0 haben sich in der Klasse <strong>SysMailerAddressField</strong> in Methode <strong>appendAddress</strong> einige Fehler eingeschlichen. Diese Fehler treten immer dann auf, wenn man per SysMailer Mails an mehr als einen Empf&auml;nger versenden m&ouml;chte bzw. zus&auml;tzlich zur Empf&auml;ngeradresse auch Empf&auml;ngernamen angibt.
</p>


<p>Hier wird bisweilen das Mail entweder nur an die zuletzt hinzugef&uuml;gte Mail-Adresse versandt oder aber die send-Methode des SysMailers verweigert ganz ihren Dienst, wenn man Empf&auml;ngernamen angibt.
</p>


<p>Nachstehend der - aus meiner Sicht - korrekte Code:
</p>


<pre class="pre_blog_axcode">
// Add item to the collection
void appendAddress(str addr, str name=&#39;&#39;)
{
    str address;
    str addresses;

    if (prmisdefault(name))
    {
        address = addr;
    }
    else
    {
        address = name + &#39; &lt;&#39; + addr + &#39;&gt;&#39;;
    }

    addresses = this.get();

    if (strlen(addresses) &gt; 0)
    {
        address = addresses + &#39;,&#39; + address;
    }

    this.set(address);

    addressCount++;
}
</pre>


<p>&nbsp;
</p>


<p>Aufgefallen sind mir die Fehler bislang bei Version 4.0 bis inkl. SP2.
</p>]]></description>
<category>Microsoft Dynamics AX (Axapta)</category>
<pubDate>Wed, 30 Apr 2008 12:45:00 +0200</pubDate>
<link>https://www.schweda.net/blog_ax.php?bid=223</link>
<comments>https://www.schweda.net/blog_ax.php?bid=223</comments>
<guid isPermaLink="true">https://www.schweda.net/blog_ax.php?bid=223</guid>
<author>heinz.schweda@schweda.net (Heinz Schweda)</author>
<wfw:commentRss>https://www.schweda.net/blog_ax.php?bid=223</wfw:commentRss>
</item>
</channel>
</rss>	
