<?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://www.schweda.net/blog_rss.php?bid=517" rel="self" type="application/rss+xml" />
<item>
<title><![CDATA[AX 2012: Anlegen einer Person im Globalen Adressbuch per Code]]></title>
<description><![CDATA[
<p>&Uuml;ber den nachfolgenden Job kann man in Dynamics AX 2012 per Code eine Person im <strong>globalen Adressbuch </strong>erstellen.
</p>

<p>Bitte beachtet, da&szlig; der Datensatz mit einem Minimum an Feldern angelegt wird und der sog. <em>Datensatztyp </em>den Wert &quot;<em>Person</em>&quot; aufweist.
</p>

<div class="div_blog_axcode">static void createPerson(Args _args)<br />
{<br />
&nbsp;&nbsp;&nbsp; AxDirPerson axDirPerson;<br />
&nbsp;&nbsp;&nbsp; AxDirPersonName axDirPersonName;<br />
&nbsp;&nbsp;&nbsp; FirstName firstName = &quot;Firstname&quot;;<br />
&nbsp;&nbsp;&nbsp; LastName lastName = &quot;LastName&quot;;<br />
<br />
&nbsp;&nbsp;&nbsp; axDirPerson = AxDirPerson::construct();<br />
&nbsp;&nbsp;&nbsp; axDirPerson.validateInput(true);<br />
&nbsp;&nbsp;&nbsp; axDirPerson.continueOnError(true);&nbsp; // Validate fields without stopping error<br />
<br />
&nbsp;&nbsp;&nbsp; axDirPerson.parmName(strFmt(&quot;%1 %2&quot;, firstName, lastName));<br />
<br />
&nbsp;&nbsp;&nbsp; axDirPerson.save();<br />
<br />
&nbsp;&nbsp;&nbsp; axDirPersonName = new AxDirPersonName();<br />
&nbsp;&nbsp;&nbsp; axDirPersonName.validateInput(true);<br />
&nbsp;&nbsp;&nbsp; axDirPersonName.continueOnError(true);&nbsp; // Validate fields without stopping error<br />
<br />
&nbsp;&nbsp;&nbsp; axDirPersonName.parmFirstName(firstName);<br />
&nbsp;&nbsp;&nbsp; axDirPersonName.parmLastName(lastName);<br />
&nbsp;&nbsp;&nbsp; axDirPersonName.parmPerson(axDirPerson.dirPerson().RecId);<br />
<br />
&nbsp;&nbsp;&nbsp; axDirPersonName.parmValidFrom(DateTimeUtil::minValue());<br />
&nbsp;&nbsp;&nbsp; axDirPersonName.parmValidTo(DateTimeUtil::maxValue());<br />
<br />
&nbsp;&nbsp;&nbsp; axDirPersonName.save();<br />
}
</div>
<br /><a class="div_blog_category_gotodetail" href="https://www.schweda.net/blog_ax.php?bid=517" target="_self" title="Weiterlesen...">Weiterlesen...</a>]]></description>
<category>Microsoft Dynamics AX (Axapta)</category>
<pubDate>Sun, 29 Jun 2014 12:37:00 +0200</pubDate>
<link>https://www.schweda.net/blog_ax.php?bid=517</link>
<comments>https://www.schweda.net/blog_ax.php?bid=517</comments>
<guid isPermaLink="true">https://www.schweda.net/blog_ax.php?bid=517</guid>
<author>heinz.schweda@schweda.net (Heinz Schweda)</author>
<wfw:commentRss>https://www.schweda.net/blog_ax.php?bid=517</wfw:commentRss>
</item>
</channel>
</rss>	
