<?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=349" rel="self" type="application/rss+xml" />
<item>
<title><![CDATA[Geänderte oder neue Methoden von Tabellen auflisten]]></title>
<description><![CDATA[
<p>Im folgenden findet ihr einen Job, der in einer adaptierten AX 2009er-Applikation alle Tabellenmethoden auflistet, die entweder erstellt wurden oder gegen&uuml;ber dem Standard ver&auml;ndert wurden.
</p>


<pre class="pre_blog_axcode">
static void ListChangedOrCreatedTableMethods(Args _args)
{
    SysDictTable    SysDictTable;
    treeNode        treeNode;
    treeNode        treeNodeBase;
    treeNode        treeNodeCustom;
    treeNode        treeNodeTables;
    UtilEntryLevel  CurrentUtilEntryLevel;
    #AOT
    ;
    treeNodeTables = TreeNode::findNode(#TablesPath + #AOTRootPath);
    treeNodeTables = treeNodeTables.AOTfirstChild();

    setPrefix(&#39;List changed/created tablemethods&#39;);

    while(treeNodeTables)
    {
        SysDictTable = SysDictTable::newTableId(tableName2Id(treeNodeTables.treeNodeName()));

        setPrefix(SysDictTable.name());

        treeNode = TreeNode::findNode(#TablesPath + #AOTRootPath + SysDictTable.name() + #AOTRootPath + &quot;Methods&quot;);
        treeNode = treeNode.AOTfirstChild();
        while(treeNode)
        {
            treeNodeBase    = null;
            treeNodeCustom  = null;

            // Partner
            if( !treeNodeBase) treeNodeBase = treeNode.getNodeInLayer(UtilEntryLevel::bup);
            if( !treeNodeBase) treeNodeBase = treeNode.getNodeInLayer(UtilEntryLevel::bus);
            // Solutions
            if( !treeNodeBase) treeNodeBase = treeNode.getNodeInLayer(UtilEntryLevel::sl3);
            if( !treeNodeBase) treeNodeBase = treeNode.getNodeInLayer(UtilEntryLevel::sl2);
            if( !treeNodeBase) treeNodeBase = treeNode.getNodeInLayer(UtilEntryLevel::sl1);
            // Hotfix
            if( !treeNodeBase) treeNodeBase = treeNode.getNodeInLayer(UtilEntryLevel::hfx);
            // Microsoft
            if( !treeNodeBase) treeNodeBase = treeNode.getNodeInLayer(UtilEntryLevel::glp);
            if( !treeNodeBase) treeNodeBase = treeNode.getNodeInLayer(UtilEntryLevel::gls);
            if( !treeNodeBase) treeNodeBase = treeNode.getNodeInLayer(UtilEntryLevel::syp);
            if( !treeNodeBase) treeNodeBase = treeNode.getNodeInLayer(UtilEntryLevel::sys);

            // Custom layers
            if( !treeNodeCustom) { treeNodeCustom = treeNode.getNodeInLayer(UtilEntryLevel::vap);   CurrentUtilEntryLevel = UtilEntryLevel::vap; }
            if( !treeNodeCustom) { treeNodeCustom = treeNode.getNodeInLayer(UtilEntryLevel::var);   CurrentUtilEntryLevel = UtilEntryLevel::var; }
            if( !treeNodeCustom) { treeNodeCustom = treeNode.getNodeInLayer(UtilEntryLevel::cup);   CurrentUtilEntryLevel = UtilEntryLevel::cup; }
            if( !treeNodeCustom) { treeNodeCustom = treeNode.getNodeInLayer(UtilEntryLevel::cus);   CurrentUtilEntryLevel = UtilEntryLevel::cus; }
            if( !treeNodeCustom) { treeNodeCustom = treeNode.getNodeInLayer(UtilEntryLevel::usp);   CurrentUtilEntryLevel = UtilEntryLevel::usp; }
            if( !treeNodeCustom) { treeNodeCustom = treeNode.getNodeInLayer(UtilEntryLevel::usr);   CurrentUtilEntryLevel = UtilEntryLevel::usr; }

            // Changed methods
            if(treeNodeBase)
            {
                if( treeNodeBase.AOTgetSource() != treeNode.AOTgetSource())
                {
                    warning(strFmt( &quot;Method &#39;%1&#39; was changed in layer &#39;%2&#39;.&quot;,
                                    treeNode.treeNodeName(),
                                    enum2str(CurrentUtilEntryLevel)));
                }
            }

            // New created methods
            if( !treeNodeBase)
            {
                info(strFmt( &quot;Method &#39;%1&#39; was created in layer &#39;%2&#39;.&quot;,
                             treeNode.treeNodeName(),
                             enum2str(CurrentUtilEntryLevel)));
            }

            treeNode = treeNode.AOTnextSibling();
        }

        treeNodeTables = treeNodeTables.AOTnextSibling();
    }
}
</pre>




<p>Ein &auml;hnlicher Job der prinzipiell das Gleiche erledigt, allerdings f&uuml;r alle Klassenmethoden, ist <a href="http://www.schweda.net/blog_ax.php?bid=348" target="_self" title="Geänderte oder neue Methoden von Klassen auflisten">hier</a> zu finden.
</p>]]></description>
<category>Microsoft Dynamics AX (Axapta)</category>
<pubDate>Sun, 01 Nov 2009 21:18:00 +0100</pubDate>
<link>https://www.schweda.net/blog_ax.php?bid=349</link>
<comments>https://www.schweda.net/blog_ax.php?bid=349</comments>
<guid isPermaLink="true">https://www.schweda.net/blog_ax.php?bid=349</guid>
<author>heinz.schweda@schweda.net (Heinz Schweda)</author>
<wfw:commentRss>https://www.schweda.net/blog_ax.php?bid=349</wfw:commentRss>
</item>
</channel>
</rss>	
