<?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=389" rel="self" type="application/rss+xml" />
<item>
<title><![CDATA[Feldwert eines aufrufenden Objektes ermitteln]]></title>
<description><![CDATA[
<p>In vielen Objekten sieht man Kontrukte wie das folgende, die dazu dienen, einen Wert aus dem aufrufenden Datensatz zu ermitteln.
</p>


<pre class="pre_blog_axcode">
if (element.args() &amp;&amp; element.args().record())
{
    switch (element.args().dataset())
    {
        case tablenum(PurchLine)    :
            itemIdCaller = element.args().record().(fieldNum(purchLine, ItemId));
            break;
        case tablenum(SalesLine)    :
            itemIdCaller = element.args().record().(fieldNum(SalesLine, ItemId));
            break;
        case tablenum(SalesQuotationLine)    :
            itemIdCaller = element.args().record().(fieldNum(SalesQuotationLine, ItemId));
            break;
    }
}
</pre>


<p>Einfacher geht&rsquo;s mit&nbsp;unten dem stehenden&nbsp;St&uuml;ckchen Code! Der grosse Vorteil von diesem ist, da&szlig; wann immer man das Objekt von einem Datensatz aus aufruft, der ein Feld namens <em>itemId</em> enth&auml;lt, die Logik&nbsp;abgearbeitet wird&nbsp;ohne da&szlig; man jede Tabelle einzeln im switch-Statement ber&uuml;cksichtigen muss.
</p>

<br /><a class="div_blog_category_gotodetail" href="https://www.schweda.net/blog_ax.php?bid=389" target="_self" title="Weiterlesen...">Weiterlesen...</a>]]></description>
<category>Microsoft Dynamics AX (Axapta)</category>
<pubDate>Mon, 19 Jul 2010 09:17:00 +0200</pubDate>
<link>https://www.schweda.net/blog_ax.php?bid=389</link>
<comments>https://www.schweda.net/blog_ax.php?bid=389</comments>
<guid isPermaLink="true">https://www.schweda.net/blog_ax.php?bid=389</guid>
<author>heinz.schweda@schweda.net (Heinz Schweda)</author>
<wfw:commentRss>https://www.schweda.net/blog_ax.php?bid=389</wfw:commentRss>
</item>
</channel>
</rss>	
