<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.msdn.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Dynamics AX GFM Team Blog</title><link>http://blogs.msdn.com/b/ax_gfm_framework_team_blog/</link><description>Brought to you by Microsoft teams working on the Global Financial Management (GFM) frameworks and applications for Microsoft Dynamics AX 2012 and beyond</description><dc:language>en-US</dc:language><generator>Telligent Evolution Platform Developer Build (Build: 5.6.50428.7875)</generator><item><title>Ledger account combinations - Part 6 (Ledger dimensions (B)) </title><link>http://blogs.msdn.com/b/ax_gfm_framework_team_blog/archive/2013/02/15/ledger-account-combinations-part-6-_2800_ledger-dimensions_2900_-.aspx</link><pubDate>Fri, 15 Feb 2013 15:55:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10394033</guid><dc:creator>Bill Frandsen</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/ax_gfm_framework_team_blog/rsscomments.aspx?WeblogPostID=10394033</wfw:commentRss><comments>http://blogs.msdn.com/b/ax_gfm_framework_team_blog/archive/2013/02/15/ledger-account-combinations-part-6-_2800_ledger-dimensions_2900_-.aspx#comments</comments><description>&lt;h4&gt;&lt;span style="font-family: Calibri;"&gt;Introduction&lt;/span&gt;&lt;/h4&gt;
&lt;p&gt;&lt;span style="font-size: small;"&gt;&lt;span style="font-family: Calibri;"&gt;Continuing this series of blog posts, we continue the discussion on the LedgerDimensions region highlighted in pale yellow in the model below in figure 1.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="text-align: center;"&gt;&amp;nbsp;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-50-86/7838.P6_5F00_IMG1.png"&gt;&lt;img src="http://blogs.msdn.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-50-86/7838.P6_5F00_IMG1.png" alt="" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p align="center"&gt;&lt;strong&gt;&lt;span style="font-size: small;"&gt;&lt;span style="font-family: Calibri;"&gt;Figure 1: Ledger dimension storage in framework&lt;/span&gt;&lt;/span&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: small;"&gt;&lt;span style="font-family: Calibri;"&gt;&lt;strong&gt;Ledger dimension storage with rules&lt;/strong&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: small;"&gt;&lt;span style="font-family: Calibri;"&gt;Building on the ledger dimension storage example started in the previous blog post, we will add to the scenario and assume the user will go back and change the values from [ 150 - A ] to [ 145 - Q ]. As we know from the advanced rules previously set up, this will trigger a third segment to be added to the account structure.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p align="center"&gt;&amp;nbsp;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-50-86/4718.P6_5F00_IMG2.png"&gt;&lt;img style="border: 0px currentColor;" src="http://blogs.msdn.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-50-86/4718.P6_5F00_IMG2.png" alt="" width="269" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p align="center"&gt;&lt;strong&gt;&lt;span style="font-size: small;"&gt;&lt;span style="font-family: Calibri;"&gt;Figure 2: In-edit ledger account segment (before tab)&lt;/span&gt;&lt;/span&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: small;"&gt;&lt;span style="font-family: Calibri;"&gt;When the user tabs from the second segment, a third segment is added to the control and focus placed in it:&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p align="center"&gt;&amp;nbsp;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-50-86/3125.P6_5F00_IMG3.png"&gt;&lt;img style="border: 0px currentColor;" src="http://blogs.msdn.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-50-86/3125.P6_5F00_IMG3.png" alt="" width="270" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p align="center"&gt;&lt;strong&gt;&lt;span style="font-size: small;"&gt;&lt;span style="font-family: Calibri;"&gt;Figure 3: In-edit ledger account segment (after tab)&lt;/span&gt;&lt;/span&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: small;"&gt;&lt;span style="font-family: Calibri;"&gt;Now, the user can enter a license number:&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p align="center"&gt;&amp;nbsp;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-50-86/4834.P6_5F00_IMG4.png"&gt;&lt;img style="border: 0px currentColor;" src="http://blogs.msdn.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-50-86/4834.P6_5F00_IMG4.png" alt="" width="269" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p align="center"&gt;&lt;strong&gt;&lt;span style="font-size: small;"&gt;&lt;span style="font-family: Calibri;"&gt;Figure 4: Completed ledger account field&lt;/span&gt;&lt;/span&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: small;"&gt;&lt;span style="font-family: Calibri;"&gt;As soon as the third field is entered and the user tabs out of the control, it will trigger the validation of the combination.&amp;nbsp; If it is valid, the combination will be saved as a LedgerDimension.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: small;"&gt;&lt;span style="font-family: Calibri;"&gt;The following is known about the new combination:&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;span style="font-size: small;"&gt;&lt;span style="font-family: Calibri;"&gt;The account structure is "MyAccountStructure"&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-size: small;"&gt;&lt;span style="font-family: Calibri;"&gt;The first segment is the "MainAccount" dimension with a value of 145.&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-size: small;"&gt;&lt;span style="font-family: Calibri;"&gt;The second segment is the "Customer" dimension with a value of Q.&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-size: small;"&gt;&lt;span style="font-family: Calibri;"&gt;1 additional segment was added due to an account rule structure "MyRuleStructure1" being added due to the values matching the rule for the first two segments.&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-size: small;"&gt;&lt;span style="font-family: Calibri;"&gt;The third segment is the "LicensePlate" dimension with a value of AAA 111.&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;span style="font-size: small;"&gt;&lt;span style="font-family: Calibri;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p align="center"&gt;&amp;nbsp;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-50-86/7002.Fix6_5F00_5.png"&gt;&lt;img src="http://blogs.msdn.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-50-86/7002.Fix6_5F00_5.png" alt="" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p align="center"&gt;&lt;strong&gt;&lt;span style="font-size: small;"&gt;&lt;span style="font-family: Calibri;"&gt;Figure 5: Ledger dimension storage query results&lt;/span&gt;&lt;/span&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: small;"&gt;&lt;span style="font-family: Calibri;"&gt;For this combination, a total of 8 rows were inserted across the 4 tables storing the ledger dimension. The difference between the first ledger account combination, discussed in the previous post, and this one is that multiple structures are being used to drive the dimensions that make up the ledger account combination. There are 2 records stored in the DimensionAttributeValueGroupCombination and DimensionAttributeValueGroup tables, each one representing a structure used and joined to the full combination. &lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: small;"&gt;&lt;span style="font-family: Calibri;"&gt;Notice that each record has a new RecID assigned to it.&amp;nbsp; The combination of the previous values is not updated, but rather a new combination is created making the LedgerDimensions immutable.&amp;nbsp; This was done because there is no reference counting maintained on the use of the combination. The same [ 150 - Q ] combination originally entered may have been referenced from multiple tables within the application before the user decided to change an instance to [ 145 - Q - AAA 111].&amp;nbsp; Therefore, a new combination must be created and the reference changed to it only from the table that the ledger account combination is being changed on.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: small;"&gt;&lt;span style="font-family: Calibri;"&gt;Because a user may change the combination on a record by adding or removing segment values and a new LedgerDimension created, it is possible to end up with unreferenced or orphaned LedgerDimensions over time. Allowing orphaned combinations improves performance of the overall dimension framework to not issue deletes across the tables in question when combination is changed.&amp;nbsp; It is also likely after a combination is used once that it will be reused again and removing it instantly on removal of the last reference may only result it in being recreated again.&amp;nbsp; Orphaned LedgerDimensions are still structurally valid and can be reused in the future if the combination of values in relation to the structures and rules are entered again.&amp;nbsp; If a combination is ever entered a subsequent time, no records are inserted and the existing reference is reused providing greater performance.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: small;"&gt;&lt;span style="font-family: Calibri;"&gt;Optimizations are also made for storage size and insert cost when advanced rules are used.&amp;nbsp; Consider the following example as a new account combination is entered:&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p align="center"&gt;&amp;nbsp;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-50-86/1323.P6_5F00_IMG6.png"&gt;&lt;img style="border: 0px currentColor;" src="http://blogs.msdn.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-50-86/1323.P6_5F00_IMG6.png" alt="" width="269" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p align="center"&gt;&lt;strong&gt;&lt;span style="font-size: small;"&gt;&lt;span style="font-family: Calibri;"&gt;Figure 6: Changed ledger account field&lt;/span&gt;&lt;/span&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: small;"&gt;&lt;span style="font-family: Calibri;"&gt;In this case, the only difference between the new combination and the previous is that the license plate number (provided by the advanced rule) was changed. The data storage of the combination will appear as follows (new records in white):&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p align="center"&gt;&amp;nbsp;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-50-86/0143.Fix6_5F00_7.png"&gt;&lt;img src="http://blogs.msdn.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-50-86/0143.Fix6_5F00_7.png" alt="" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p align="center"&gt;&lt;strong&gt;&lt;span style="font-size: small;"&gt;&lt;span style="font-family: Calibri;"&gt;Figure 7: Additional ledger dimension storage query results&lt;/span&gt;&lt;/span&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: small;"&gt;&lt;span style="font-family: Calibri;"&gt;In the creation of the new combination, the 5 records highlighted in white were inserted:&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;span style="font-size: small;"&gt;&lt;span style="font-family: Calibri;"&gt;1 in DimensionAttributeValueCombination&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-size: small;"&gt;&lt;span style="font-family: Calibri;"&gt;2 in DimensionAttributeValueGroupCombination&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-size: small;"&gt;&lt;span style="font-family: Calibri;"&gt;1 in DimensionAttributeValueGroup (instead of 2)&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-size: small;"&gt;&lt;span style="font-family: Calibri;"&gt;1 in DimensionAttributeLevelValue (instead of 3)&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;span style="font-size: small;"&gt;&lt;span style="font-family: Calibri;"&gt;This is because the values stored as part of the account structure 'group' are the same between the previous combination (DAVC2) and this combination (DAVC3).&amp;nbsp; Those DimensionAttributeValueGroup and DimensionAttributeLevelValue records did not need to be recreated. Instead, we were able to reuse 3 records and save their insertion cost.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: small;"&gt;&lt;span style="font-family: Calibri;"&gt;Alternately, had the structure associated with the account rule allowed blanks for the license plate number, and a combination of just [ 145 - Q ] was created, there would only have been 2 new records inserted instead:&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;span style="font-size: small;"&gt;&lt;span style="font-family: Calibri;"&gt;1 in DimensionAttributeValueCombination&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-size: small;"&gt;&lt;span style="font-family: Calibri;"&gt;1 in DimensionAttributeValueGroupCombination &lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-size: small;"&gt;&lt;span style="font-family: Calibri;"&gt;0 in DimensionAttributeValueGroup&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-size: small;"&gt;&lt;span style="font-family: Calibri;"&gt;0 in DimensionAttributeLevelValue&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;span style="font-size: small;"&gt;&lt;span style="font-family: Calibri;"&gt;This is because all of the DimensionAttributeValueGroup and DimensionAttributeLevelValue records already existed and could be fully reused on the new combination. This is the primary reason why data should never be directly modified within the LedgerDimension storage tables. A change to a single record could affect not only all references to that ledger dimension but also one or more other ledger dimensions and references to them.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: small;"&gt;&lt;span style="font-family: Calibri;"&gt;Although partially collapsed in the above examples in figure 5 and figure 7, there is a Hash code assigned to the DimensionAttributeValueCombination and DimensionAttributeValueGroup tables.&amp;nbsp; The purpose and source of this advanced data column are discussed in the &lt;a title="next and final blog post  " href="http://blogs.msdn.com/b/ax_gfm_framework_team_blog/archive/2013/02/15/ledger-account-combinations-part-7-_2800_advanced-topics_2900_-.aspx"&gt;next and final blog post&lt;/a&gt; in this series.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10394033" width="1" height="1"&gt;</description></item><item><title>Ledger account combinations - Part 7 (Advanced topics) </title><link>http://blogs.msdn.com/b/ax_gfm_framework_team_blog/archive/2013/02/15/ledger-account-combinations-part-7-_2800_advanced-topics_2900_-.aspx</link><pubDate>Fri, 15 Feb 2013 15:55:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10394034</guid><dc:creator>Bill Frandsen</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/ax_gfm_framework_team_blog/rsscomments.aspx?WeblogPostID=10394034</wfw:commentRss><comments>http://blogs.msdn.com/b/ax_gfm_framework_team_blog/archive/2013/02/15/ledger-account-combinations-part-7-_2800_advanced-topics_2900_-.aspx#comments</comments><description>&lt;h4&gt;&lt;span style="font-family: Calibri;"&gt;Introduction&lt;/span&gt;&lt;/h4&gt;
&lt;p&gt;&lt;span style="font-size: small;"&gt;&lt;span style="font-family: Calibri;"&gt;Concluding this series of blog posts, we will discuss some of the advanced topics that explain some of the deeper design and implementation decisions that drive the way the dimension framework works. &lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: small;"&gt;&lt;span style="font-family: Calibri;"&gt;The model below in figure 1 shows the various areas within the dimension framework.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="text-align: center;"&gt;&amp;nbsp;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-50-86/8780.P7_5F00_IMG1.png"&gt;&lt;img src="http://blogs.msdn.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-50-86/8780.P7_5F00_IMG1.png" alt="" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p align="center"&gt;&lt;strong&gt;&lt;span style="font-size: small;"&gt;&lt;span style="font-family: Calibri;"&gt;Figure 1: Overall framework&lt;/span&gt;&lt;/span&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;h4&gt;&lt;span style="font-size: small;"&gt;&lt;span style="font-family: Calibri;"&gt;Hashes&lt;/span&gt;&lt;/span&gt;&lt;/h4&gt;
&lt;p&gt;&lt;span style="font-size: small;"&gt;&lt;span style="font-family: Calibri;"&gt;The design of the database storage in the dimension framework intends to:&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;span style="font-size: small;"&gt;&lt;span style="font-family: Calibri;"&gt;Support immutable data where data is only inserted, never updated or deleted&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-size: small;"&gt;&lt;span style="font-family: Calibri;"&gt;Reuse previously created combinations to lower insertion costs&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-size: small;"&gt;&lt;span style="font-family: Calibri;"&gt;Avoid reference counting and maintenance of it&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-size: small;"&gt;&lt;span style="font-family: Calibri;"&gt;Provide fast performance to find an existing combination for reuse&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;span style="font-size: small;"&gt;&lt;span style="font-family: Calibri;"&gt;As the dimension framework allows unlimited dimensions and unlimited structures on a ledger account combination, it is difficult to create a single large or multiple smaller queries to find an existing set or combination. Since the number of records and order of those records is potentially different for every combination, a hash-based solution was implemented. &lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: small;"&gt;&lt;span style="font-family: Calibri;"&gt;This hash represents the unique information contained in the associated tables' records for fast querying.&amp;nbsp; A single binary container field (160 bit, 20 byte hash column) is stored to uniquely identify the data contained by the set or combination. &lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: small;"&gt;&lt;span style="font-family: Calibri;"&gt;The dimension framework uses hashes to uniquely identify data in the following tables:&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;span style="font-size: small;"&gt;&lt;span style="font-family: Calibri;"&gt;DimensionAttributeValueCombination &lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;ul&gt;
&lt;li&gt;&lt;span style="font-size: small;"&gt;&lt;span style="font-family: Calibri;"&gt;Consisting of data from all the linked records in the DimensionAttributeValueGroup and DimensionAttributeLevelValue tables&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;li&gt;&lt;span style="font-size: small;"&gt;&lt;span style="font-family: Calibri;"&gt;DimensionAttributeValueGroup&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;ul&gt;
&lt;li&gt;&lt;span style="font-size: small;"&gt;&lt;span style="font-family: Calibri;"&gt;Consisting of data from the linked records in the DimensionAttributeLevelValue table&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;li&gt;&lt;span style="font-size: small;"&gt;&lt;span style="font-family: Calibri;"&gt;DimensionAttributeSet&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;ul&gt;
&lt;li&gt;&lt;span style="font-size: small;"&gt;&lt;span style="font-family: Calibri;"&gt;Consisting of data from the associated DimensionAttributeSetItem records&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;li&gt;&lt;span style="font-size: small;"&gt;&lt;span style="font-family: Calibri;"&gt;DimensionAttributeValueSet&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;ul&gt;
&lt;li&gt;&lt;span style="font-size: small;"&gt;&lt;span style="font-family: Calibri;"&gt;Consisting of data from the associated DimensionAttributeValueSetItem records&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/ul&gt;
&lt;h4&gt;&lt;span style="font-size: small;"&gt;&lt;span style="font-family: Calibri;"&gt;Hash messages&lt;/span&gt;&lt;/span&gt;&lt;/h4&gt;
&lt;p&gt;&lt;span style="font-size: small;"&gt;&lt;span style="font-family: Calibri;"&gt;In order to produce a hash, a message is created containing individual ordered information about the contents of the set or combination. It varies based upon the particular hash being generated, but basically includes information about the dimensions, values, and structures and their order within the set or combination, if applicable. This information is internally calculated in a prescribed manner and passed onto a hashing routine to generate a SHA-1 hash to persist using a binary container. The exact order and contents of these messages are provided by the methods within the storage supporting classes of the dimension framework including the DimensionAttributeSetStorage, DimensionAttributeValueSetStorage, and DimensionStorage classes.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;h4&gt;&lt;span style="font-size: small;"&gt;&lt;span style="font-family: Calibri;"&gt;HashKeys&lt;/span&gt;&lt;/span&gt;&lt;/h4&gt;
&lt;p&gt;&lt;span style="font-size: small;"&gt;&lt;span style="font-family: Calibri;"&gt;In order to generate a hash message, something that uniquely identifies each dimension, value and structure that makes up the combination is needed. While a RecID can serve as a unique identifier, it is only considered a surrogate, as it is not immutable and can change if the record were to be exported and imported into a different system or partition, for example.&amp;nbsp; The RecID can be reassigned during the import process.&amp;nbsp; Any hash that was created with a hash message using a RecID could no longer be used to identify a combination in the dimension framework for that new system or partition. Instead another identifier, a GUID, is used. This GUID resides on the DimensionAttribute, DimensionAttributeValue and DimensionHierarchy tables and is stored in the HashKey column.&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: Calibri; font-size: small;"&gt;Each time a new record is created, a GUID is assigned and remains with that record to uniquely identify it.&lt;/span&gt;&lt;/p&gt;
&lt;h4&gt;&lt;span style="font-size: small;"&gt;&lt;span style="font-family: Calibri;"&gt;Risks of changing data directly&lt;/span&gt;&lt;/span&gt;&lt;/h4&gt;
&lt;p&gt;&lt;span style="font-size: small;"&gt;&lt;span style="font-family: Calibri;"&gt;It is extremely important that no data be directly modified outside of the application framework such as in SQL Server Management Studio. This extends to modifying any data in any column of the table not just the columns discussed in these posts; as well as replicating data from one row to another and attempting to create 'new' sets or combinations outside of the dimension framework storage classes.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: small;"&gt;&lt;span style="font-family: Calibri;"&gt;It is also important to understand this when considering backups and only partial restoration of data which could affect referential and hash integrity.&amp;nbsp; For example, it would be problematic to only back up the LedgerDimension related records and importing them into another partition without also bringing in all of the other records in the dimension framework as well as all of the backing entity records such as from the CustTable or others that were used in the creation of any combinations. Any attempts to modify the data in these tables or to synthesize GUIDs or hashes will lead to corrupt data and complex time consuming analysis to find the source of the corruption and to try to undo it.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;h4&gt;&lt;span style="font-size: small;"&gt;&lt;span style="font-family: Calibri;"&gt;Apparent duplicate combinations&lt;/span&gt;&lt;/span&gt;&lt;/h4&gt;
&lt;p&gt;&lt;span style="font-size: small;"&gt;&lt;span style="font-family: Calibri;"&gt;When browsing the tables of the dimension framework, it may appear that combinations are duplicated when only viewing the DisplayValue field stored on the records. This does not mean that duplicate combinations exist; rather it means that data within the hash or joined tables is different even though the DisplayValue appears the same.&amp;nbsp; The DisplayValue strings are stored on the records to improve performance for some scenarios but are not used to uniquely identify the record.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: small;"&gt;&lt;span style="font-family: Calibri;"&gt;Consider an account structure with [ MainAccount - Department ] in one company and another account structure with [ MainAccount - CostCenter ] in a different company. It is possible for the DisplayValue of 2 combinations, one for each account structure, to appear as " 145 - A ".&amp;nbsp; For the first account structure "A" represents a Department within that company, but for the second it represents a Cost center within that company.&amp;nbsp; Additionally, there are multiple types of a LedgerDimension that are stored in the DimensionAttributeValueCombination table including special ones for budgeting that may appear the same from examining the DisplayValue field as other combinations ones but hold different information internally and hold uniquely different hash values.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;h4&gt;&lt;span style="font-size: small;"&gt;&lt;span style="font-family: Calibri;"&gt;Versioning / date effective data&lt;/span&gt;&lt;/span&gt;&lt;/h4&gt;
&lt;p&gt;&lt;span style="font-size: small;"&gt;&lt;span style="font-family: Calibri;"&gt;The dimension framework does not support versioning or date effective data directly. If any backing entities it references are versioned, and a new RecID assigned to newer versions within the same table, the framework will properly link to the correct version through the DimensionAttributeValue record. If the same backing entity record is used and another table tracks revisions to it in the owning module, then the dimension framework will not be able to know the difference as the backing entity RecID would not be different between versions.&amp;nbsp; None of the dimension framework tables (such as dimensions, structures, rules, constraints) internally support versioning.&amp;nbsp; The previous versions are replaced with a new version with no history maintained.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: small;"&gt;&lt;span style="font-family: Calibri;"&gt;When a structure or rule is changed, and there are ledger account combinations saved on unposted transactions, the dimension framework will create new combinations and update any foreign key references to them on unposted transaction tables. It will not change the original combinations as they may be referenced from posted transactions.&amp;nbsp; The two combinations are not linked in any way. There is not a way to determine the way a structure and its rules appeared prior to change. Some information can be determined by the data stored in the combination, but since blank values are not stored, it is incomplete and cannot be used to reconstruct a previous version.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: small;"&gt;&lt;span style="font-family: Calibri;"&gt;The dimension framework does supports valid from and valid to dates at the level of a dimension value.&amp;nbsp; This indicates when the value is considered "valid" and does not represent the historical state of the value in the same way that date effective data does.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: small;"&gt;&lt;span style="font-family: Calibri;"&gt;This concludes this series of blog posts about the dimension framework and &amp;ldquo;What happens when I create a ledger account combination?&amp;rdquo;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10394034" width="1" height="1"&gt;</description></item><item><title>Ledger account combinations - Part 5 (Ledger dimensions (A)) </title><link>http://blogs.msdn.com/b/ax_gfm_framework_team_blog/archive/2013/02/15/ledger-account-combinations-part-5-_2800_ledger-dimensions_2900_-.aspx</link><pubDate>Fri, 15 Feb 2013 15:54:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10394030</guid><dc:creator>Bill Frandsen</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/ax_gfm_framework_team_blog/rsscomments.aspx?WeblogPostID=10394030</wfw:commentRss><comments>http://blogs.msdn.com/b/ax_gfm_framework_team_blog/archive/2013/02/15/ledger-account-combinations-part-5-_2800_ledger-dimensions_2900_-.aspx#comments</comments><description>&lt;h4&gt;&lt;span style="font-family: Calibri;"&gt;Introduction&lt;/span&gt;&lt;/h4&gt;
&lt;p&gt;&lt;span style="font-size: small;"&gt;&lt;span style="font-family: Calibri;"&gt;Continuing this series of blog posts, we will cover the LedgerDimensions region highlighted in pale yellow in the model below in figure 1. This region will be discussed in two parts covering this post and the next post.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: small;"&gt;&lt;span style="font-family: Calibri;"&gt;Once all of the configuration data is set up, ledger account combinations can be entered, validated and persisted. The primary consumption of the dimension framework occurs when the application leverages this area.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="text-align: center;"&gt;&amp;nbsp;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-50-86/0245.P5_5F00_IMG1.png"&gt;&lt;img src="http://blogs.msdn.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-50-86/0245.P5_5F00_IMG1.png" alt="" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p align="center"&gt;&lt;strong&gt;&lt;span style="font-size: small;"&gt;&lt;span style="font-family: Calibri;"&gt;Figure 1: Ledger dimension storage in framework&lt;/span&gt;&lt;/span&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;h4&gt;&lt;span style="font-size: small;"&gt;&lt;span style="font-family: Calibri;"&gt;Ledger dimension storage without rules&lt;/span&gt;&lt;/span&gt;&lt;/h4&gt;
&lt;p&gt;&lt;span style="font-size: small;"&gt;&lt;span style="font-family: Calibri;"&gt;To understand LedgerDimensions, we need to understand how a ledger account combination is entered by a user.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: small;"&gt;&lt;span style="font-family: Calibri;"&gt;Using the account structure and rule setup from the previous blog post (#4 - Advanced rules), we will walk through the user interaction with the account entry control when an account is entered. To refresh, the account structure appears as follows:&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p align="center"&gt;&amp;nbsp;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-50-86/5123.P5_5F00_IMG2.png"&gt;&lt;img style="border: 0px currentColor;" src="http://blogs.msdn.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-50-86/5123.P5_5F00_IMG2.png" alt="" width="336" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p align="center"&gt;&lt;strong&gt;&lt;span style="font-size: small;"&gt;&lt;span style="font-family: Calibri;"&gt;Figure 2: Basic structure and constraints&lt;/span&gt;&lt;/span&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: small;"&gt;&lt;span style="font-family: Calibri;"&gt;There is a single account rule associated with the structure:&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p align="center"&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-50-86/2746.P5_5F00_IMG3.png"&gt;&lt;img src="http://blogs.msdn.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-50-86/2746.P5_5F00_IMG3.png" alt="" border="0" /&gt;&lt;/a&gt;&amp;nbsp;&lt;/p&gt;
&lt;p align="center"&gt;&lt;strong&gt;&lt;span style="font-size: small;"&gt;&lt;span style="font-family: Calibri;"&gt;Figure 3: Single rule added&lt;/span&gt;&lt;/span&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: small;"&gt;&lt;span style="font-family: Calibri;"&gt;With the added structure defined as follows:&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p align="center"&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-50-86/6710.P5_5F00_IMG4.png"&gt;&lt;img style="border: 0px currentColor;" src="http://blogs.msdn.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-50-86/6710.P5_5F00_IMG4.png" alt="" width="316" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p align="center"&gt;&lt;strong&gt;&lt;span style="font-size: small;"&gt;&lt;span style="font-family: Calibri;"&gt;Figure 4: Single structure added&lt;/span&gt;&lt;/span&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: small;"&gt;&lt;span style="font-family: Calibri;"&gt;When a user first sees a ledger account field on a form, it will appear as follows when focus is not in the field:&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p align="center"&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-50-86/8357.P5_5F00_IMG5.png"&gt;&lt;img style="border: 0px currentColor;" src="http://blogs.msdn.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-50-86/8357.P5_5F00_IMG5.png" alt="" width="270" /&gt;&lt;/a&gt;&amp;nbsp;&lt;/p&gt;
&lt;p align="center"&gt;&lt;strong&gt;&lt;span style="font-size: small;"&gt;&lt;span style="font-family: Calibri;"&gt;Figure 5: Empty ledger account field (without focus)&lt;/span&gt;&lt;/span&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: small;"&gt;&lt;span style="font-family: Calibri;"&gt;When the user clicks into the field, since the account structure has 2 segments, the following will appear:&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p align="center"&gt;&amp;nbsp;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-50-86/1563.P5_5F00_IMG6.png"&gt;&lt;img style="border: 0px currentColor;" src="http://blogs.msdn.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-50-86/1563.P5_5F00_IMG6.png" alt="" width="272" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p align="center"&gt;&lt;strong&gt;&lt;span style="font-size: small;"&gt;&lt;span style="font-family: Calibri;"&gt;Figure 6: In-edit ledger account field&lt;/span&gt;&lt;/span&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: small;"&gt;&lt;span style="font-family: Calibri;"&gt;The user then enters the combination of [ 150 - A ]. &lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p align="center"&gt;&amp;nbsp;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-50-86/3286.P5_5F00_IMG7.png"&gt;&lt;img style="border: 0px currentColor;" src="http://blogs.msdn.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-50-86/3286.P5_5F00_IMG7.png" alt="" width="269" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p align="center"&gt;&lt;strong&gt;&lt;span style="font-size: small;"&gt;&lt;span style="font-family: Calibri;"&gt;Figure 7: Completed ledger account field&lt;/span&gt;&lt;/span&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: small;"&gt;&lt;span style="font-family: Calibri;"&gt;As soon as the second segment is entered and the user tabs out of the control, the dimension framework saves the combination and then validates if the combination is valid based on the constraints.&amp;nbsp; In this case, the combination is valid.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: small;"&gt;&lt;span style="font-family: Calibri;"&gt;The following is known about the combination:&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;span style="font-size: small;"&gt;&lt;span style="font-family: Calibri;"&gt;The account structure is "MyAccountStructure"&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-size: small;"&gt;&lt;span style="font-family: Calibri;"&gt;The first segment is the "MainAccount" dimension with a value of 150.&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-size: small;"&gt;&lt;span style="font-family: Calibri;"&gt;The second segment is the "Customer" dimension with a value of A.&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-size: small;"&gt;&lt;span style="font-family: Calibri;"&gt;No additional segments were added on as the values did not match any advanced rules associated with this account structure.&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;span style="font-size: small;"&gt;&lt;span style="font-family: Calibri;"&gt;Therefore, the 2 segment values are stored as follows across the 4 tables:&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p align="center"&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-50-86/1072.Fix5_5F00_8.png"&gt;&lt;img src="http://blogs.msdn.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-50-86/1072.Fix5_5F00_8.png" alt="" border="0" /&gt;&lt;/a&gt;&amp;nbsp;&lt;/p&gt;
&lt;p align="center"&gt;&lt;strong&gt;&lt;span style="font-size: small;"&gt;&lt;span style="font-family: Calibri;"&gt;Figure 8: Ledger dimension storage query results&lt;/span&gt;&lt;/span&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: small;"&gt;&lt;span style="font-family: Calibri;"&gt;The first table is named DimensionAttributeValueCombination as it stores a full multi-segment account combination along with some de-normalized information about the combination such as the concatenated segments as a single string, a foreign key (FK) reference to the Account structure, and a FK to the MainAccount (150) that was used. &lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: small;"&gt;&lt;span style="font-family: Calibri;"&gt;Skipping the second table for now, the third table is named DimensionAttributeValueGroup. It has this name as it stores each related group of segments associated with each structure that is present in the combination. In this case, there is only one structure, the Account structure, so there is only one record here.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: small;"&gt;&lt;span style="font-family: Calibri;"&gt;The fourth table, named DimensionAttributeLevelValue, stores the individual segment values for each segment within the associated group or structure. One record exists for each segment entered.&amp;nbsp; When a segment is empty, no values are stored for it. Each record references the corresponding DimensionAttributeValue record.&amp;nbsp; If an existing one is found it is referenced, or if one does not exist for the value, it is created. This is the data linking the DimensionAttribute to the real backing entity record.&amp;nbsp; In this case, one is for the MainAccount record with an ID of 150, and one is for the CustTable record with an ID of A.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: small;"&gt;&lt;span style="font-family: Calibri;"&gt;In order to link the group of the account structure values and the segment values to the main record in the DimensionAttributeValueCombination table, a record is inserted into the second table above in figure 8, DimensionAttributeValueGroupCombination.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: small;"&gt;&lt;span style="font-family: Calibri;"&gt;In order to save a single segment in a new combination at least one record is inserted in each of these 4 tables.&amp;nbsp; An additional record is inserted in the DimensionAttributeLevelValue table for each additional segment entered.&amp;nbsp; Abstractly, these 4 tables are referred to as a LedgerDimension. A LedgerDimension is expressed as a FK that references the RecId in the DimensionAttributeValueCombination table.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: small;"&gt;&lt;span style="font-family: Calibri;"&gt;The use of advanced rules plays a role in the number of records involved in these tables for a combination.&amp;nbsp; This will be covered in the &lt;a title="next blog post" href="http://blogs.msdn.com/b/ax_gfm_framework_team_blog/archive/2013/02/15/ledger-account-combinations-part-6-_2800_ledger-dimensions_2900_-.aspx"&gt;next blog post&lt;/a&gt;.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10394030" width="1" height="1"&gt;</description></item><item><title>Ledger account combinations - Part 4 (Advanced rules) </title><link>http://blogs.msdn.com/b/ax_gfm_framework_team_blog/archive/2013/02/15/ledger-account-combinations-part-4-_2800_advanced-rules_2900_-.aspx</link><pubDate>Fri, 15 Feb 2013 15:53:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10394029</guid><dc:creator>Bill Frandsen</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/ax_gfm_framework_team_blog/rsscomments.aspx?WeblogPostID=10394029</wfw:commentRss><comments>http://blogs.msdn.com/b/ax_gfm_framework_team_blog/archive/2013/02/15/ledger-account-combinations-part-4-_2800_advanced-rules_2900_-.aspx#comments</comments><description>&lt;h4&gt;&lt;span style="font-family: Calibri;"&gt;Introduction&lt;/span&gt;&lt;/h4&gt;
&lt;p&gt;&lt;span style="font-size: small;"&gt;&lt;span style="font-family: Calibri;"&gt;Continuing this series of blog posts, we will cover the Advanced Rules region highlighted in pale yellow in the model below in figure 1. &lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: small;"&gt;&lt;span style="font-family: Calibri;"&gt;While account structures and constraints allow the user to build very simple to very complex trees of valid combinations, sometimes the business requirements are to only show a dimension as a segment in an ledger account combination only at certain times rather than just constrain the valid values allowed showing it all the time. The use of advanced rules supports this requirement.&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: small;"&gt;&lt;span style="font-family: Calibri;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="text-align: center;"&gt;&amp;nbsp;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-50-86/3302.P4_5F00_IMG1.png"&gt;&lt;img src="http://blogs.msdn.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-50-86/3302.P4_5F00_IMG1.png" alt="" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p align="center"&gt;&lt;strong&gt;&lt;span style="font-size: small;"&gt;&lt;span style="font-family: Calibri;"&gt;Figure 1: Advanced rules in framework&lt;/span&gt;&lt;/span&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;h4&gt;&lt;span style="font-size: small;"&gt;&lt;span style="font-family: Calibri;"&gt;Advanced rules&lt;/span&gt;&lt;/span&gt;&lt;/h4&gt;
&lt;p&gt;&lt;span style="font-size: small;"&gt;&lt;span style="font-family: Calibri;"&gt;Advanced rules can be added to an account structure and its constraints. While versatile, there are guidelines when they should and should not be used for best usability, performance and understanding:&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;span style="font-size: small;"&gt;&lt;span style="font-family: Calibri;"&gt;Rules cannot replace the account structure.&amp;nbsp; A structure must always exist with at least a main account segment.&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-size: small;"&gt;&lt;span style="font-family: Calibri;"&gt;Rules cannot add dimensions before other segments already in the account structure.&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-size: small;"&gt;&lt;span style="font-family: Calibri;"&gt;Rules should not be used to replace the use of constraints in the account structure for additional dimensions that are always required regardless of the main account.&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-size: small;"&gt;&lt;span style="font-family: Calibri;"&gt;Rules should not be used to replicate segments that already exist in the account structure or other rules&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-size: small;"&gt;&lt;span style="font-family: Calibri;"&gt;Any duplication will automatically join and use the most restrictive constraint.&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-size: small;"&gt;&lt;span style="font-family: Calibri;"&gt;The location of the duplicated segment will only appear in the first occurrence of it.&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;span style="font-size: small;"&gt;&lt;span style="font-family: Calibri;"&gt;Setting up an advanced rule involves defining a filter that controls when additional segments are added to a ledger account combination, and then linking rule structures (similar to account structures) that specify the additional segments, their hierarchy order and any constraints between them to be added.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: small;"&gt;&lt;span style="font-family: Calibri;"&gt;Assuming the following account structure is set up:&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p align="center"&gt;&amp;nbsp;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-50-86/5852.P4_5F00_IMG2.png"&gt;&lt;img style="border: 0px currentColor;" src="http://blogs.msdn.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-50-86/5852.P4_5F00_IMG2.png" alt="" width="336" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p align="center"&gt;&lt;strong&gt;&lt;span style="font-size: small;"&gt;&lt;span style="font-family: Calibri;"&gt;Figure 2: Basic structure and constraints&lt;/span&gt;&lt;/span&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: small;"&gt;&lt;span style="font-family: Calibri;"&gt;Let&amp;rsquo;s assume that a new advanced rule is needed to optionally add a segment (or segments) only if the user has entered main account 145 and customers G thru Q:&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p align="center"&gt;&amp;nbsp;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-50-86/8686.P4_5F00_IMG3.png"&gt;&lt;img src="http://blogs.msdn.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-50-86/8686.P4_5F00_IMG3.png" alt="" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p align="center"&gt;&lt;strong&gt;&lt;span style="font-size: small;"&gt;&lt;span style="font-family: Calibri;"&gt;Figure 3: Advanced rule form&lt;/span&gt;&lt;/span&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: small;"&gt;&lt;span style="font-family: Calibri;"&gt;Once the rule is configured, a structure and constraint definition needs to be created to define what segments to add to the ledger account combination. This is done by creating a new rule structure, similar to how an account structure is created. These structures are not immediately bound to the rule, and as such can be shared across multiple rules if necessary.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p align="center"&gt;&lt;strong&gt;&lt;span style="font-size: small;"&gt;&lt;span style="font-family: Calibri;"&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-50-86/6445.P4_5F00_IMG4.png"&gt;&lt;img src="http://blogs.msdn.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-50-86/6445.P4_5F00_IMG4.png" alt="" border="0" /&gt;&lt;/a&gt;&lt;/span&gt;&lt;/span&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;p align="center"&gt;&lt;strong&gt;&lt;span style="font-size: small;"&gt;&lt;span style="font-family: Calibri;"&gt;Figure 4: Advanced rule structure form&lt;/span&gt;&lt;/span&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: small;"&gt;&lt;span style="font-family: Calibri;"&gt;After the structure is created, it is added onto the dimension rule, and the account structure along with the rule is then activated:&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p align="center"&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-50-86/6433.P4_5F00_IMG5.png"&gt;&lt;img src="http://blogs.msdn.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-50-86/6433.P4_5F00_IMG5.png" alt="" border="0" /&gt;&lt;/a&gt;&amp;nbsp;&lt;/p&gt;
&lt;p align="center"&gt;&lt;strong&gt;&lt;span style="font-size: small;"&gt;&lt;span style="font-family: Calibri;"&gt;Figure 5: Added advanced rule structure to rule&lt;/span&gt;&lt;/span&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: small;"&gt;&lt;span style="font-family: Calibri;"&gt;The storage of this data uses some of the same tables as the storage of the account structures discussed in the previous post.&amp;nbsp; The DimensionRule, DimensionRuleAppliedHierarchy and DimensionRuleCriteria tables hold the data specific to the definition of the rule and the link to the definition of the rule structures.&amp;nbsp; The rest of the tables are shared with the account structure definition:&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="text-align: center;"&gt;&amp;nbsp;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-50-86/1738.P4_5F00_IMG6.png"&gt;&lt;img src="http://blogs.msdn.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-50-86/1738.P4_5F00_IMG6.png" alt="" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p align="center"&gt;&lt;span style="font-size: small;"&gt;&lt;span style="font-family: Calibri;"&gt;&amp;nbsp;&lt;strong&gt;Figure 6: Combined structure, rule and all constraints query results&lt;/strong&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: small;"&gt;&lt;span style="font-family: Calibri;"&gt;Examples of the effects of these rules, rule structures, segments and constraints on the entry of a ledger dimension account will be explained in the &lt;a title="next blog post  " href="http://blogs.msdn.com/b/ax_gfm_framework_team_blog/archive/2013/02/15/ledger-account-combinations-part-5-_2800_ledger-dimensions_2900_-.aspx"&gt;next blog post&lt;/a&gt; when we begin discussing entry of ledger account combinations and their storage.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10394029" width="1" height="1"&gt;</description></item><item><title>Ledger account combinations - Part 2 (Dimension enumerations, default dimensions) </title><link>http://blogs.msdn.com/b/ax_gfm_framework_team_blog/archive/2013/02/15/ledger-account-combinations-part-2-_2800_dimension-enumerations-default-dimensions_2900_-.aspx</link><pubDate>Fri, 15 Feb 2013 15:52:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10394027</guid><dc:creator>Bill Frandsen</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/ax_gfm_framework_team_blog/rsscomments.aspx?WeblogPostID=10394027</wfw:commentRss><comments>http://blogs.msdn.com/b/ax_gfm_framework_team_blog/archive/2013/02/15/ledger-account-combinations-part-2-_2800_dimension-enumerations-default-dimensions_2900_-.aspx#comments</comments><description>&lt;h4&gt;&lt;span style="font-family: Calibri;"&gt;Introduction&lt;/span&gt;&lt;/h4&gt;
&lt;p&gt;&lt;span style="font-size: small;"&gt;&lt;span style="font-family: Calibri;"&gt;Continuing this series of blog posts, we will cover the Dimension Enumerations and Default Dimensions sections highlighted in pale yellow in the model in figure 1 below.&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: small;"&gt;&lt;span style="font-family: Calibri;"&gt;Dimension enumerations and default dimensions are two storage mechanisms to store a set of references to either dimensions or dimension values. These commonly are exposed on a Financial dimensions tab on master data forms such as Customers (CustTable) or Vendors (VendTable).&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="text-align: center;"&gt;&amp;nbsp;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-50-86/3010.P2_5F00_IMG1.png"&gt;&lt;img src="http://blogs.msdn.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-50-86/3010.P2_5F00_IMG1.png" alt="" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p align="center"&gt;&lt;strong&gt;&lt;span style="font-size: small;"&gt;&lt;span style="font-family: Calibri;"&gt;Figure 1: Sets in framework&lt;/span&gt;&lt;/span&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;h4&gt;&lt;span style="font-size: small;"&gt;&lt;span style="font-family: Calibri;"&gt;Dimension Enumerations&lt;/span&gt;&lt;/span&gt;&lt;/h4&gt;
&lt;p&gt;&lt;span style="font-size: small;"&gt;&lt;span style="font-family: Calibri;"&gt;A dimension enumeration is a set of references to existing dimensions that are persisted for later use. These dimensions have no particular ordering and no constraints on which dimensions appear within the set by the dimension framework. However, in most instances, the set is constrained by the consuming code to the set of dimensions available in the current ledger.&amp;nbsp; A dimension enumeration is stored in the DimensionAttributeSet and DimensionAttributeSetItem tables.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: small;"&gt;&lt;span style="font-family: Calibri;"&gt;The set specifies an enumeration type which is the enumNum() of the BaseEnum that represents the source of enumeration values to associate with each dimension. Therefore, this is a list of enumeration values as defined by the developer; not a list of user-entered values from backing entities. In Dynamics AX 2012 R2, an example of this is storage of a list of dimensions that are to be Fixed, labeled as Fixed value, or NotFixed, labeled as Not fixed, which are associated with each main account.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p align="center"&gt;&amp;nbsp;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-50-86/3542.P2_5F00_IMG2.png"&gt;&lt;img style="border: 0px currentColor;" src="http://blogs.msdn.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-50-86/3542.P2_5F00_IMG2.png" alt="" width="186" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p align="center"&gt;&lt;strong&gt;&lt;span style="font-size: small;"&gt;&lt;span style="font-family: Calibri;"&gt;Figure 2: Dimension enumerations on a form&lt;/span&gt;&lt;/span&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: small;"&gt;&lt;span style="font-family: Calibri;"&gt;In the above example in figure 2, the enumeration DimensionFixed is used to constrain the list of values in the drop down list. &lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p align="center"&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-50-86/2548.P2_5F00_IMG3.png"&gt;&lt;img style="border: 0px currentColor;" src="http://blogs.msdn.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-50-86/2548.P2_5F00_IMG3.png" alt="" width="139" /&gt;&lt;/a&gt;&amp;nbsp;&lt;/p&gt;
&lt;p align="center"&gt;&lt;strong&gt;&lt;span style="font-size: small;"&gt;&lt;span style="font-family: Calibri;"&gt;Figure 3: A dimension enumeration BaseEnum&lt;/span&gt;&lt;/span&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: small;"&gt;&lt;span style="font-family: Calibri;"&gt;The value entered represents one item with a "1" EnumValue (DimensionFixed::Fixed) and the other one with the default "0" EnumValue (DimensionFixed::NotFixed).&amp;nbsp; The DimensionAttributeSet is stored as follows:&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p align="center"&gt;&amp;nbsp;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-50-86/7043.Fix2_5F00_4.png"&gt;&lt;img src="http://blogs.msdn.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-50-86/7043.Fix2_5F00_4.png" alt="" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p align="center"&gt;&lt;strong&gt;&lt;span style="font-size: small;"&gt;&lt;span style="font-family: Calibri;"&gt;Figure 4: Dimension enumeration storage query results&lt;/span&gt;&lt;/span&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: small;"&gt;&lt;span style="font-family: Calibri;"&gt;The MainAccountLegalEntity record references the DimensionAttributeSet record by its FixedDimensions field. The DimensionAttributeSet represents the combination of dimensions for the enumeration type. The DimensionAttributeSetItem records represent each dimension and enumeration value pair in the set, where the enumeration value is represented by its integer value.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: small;"&gt;&lt;span style="font-family: Calibri;"&gt;The same pattern extends to the use of the NoYes BaseEnum which can be rendered in the UI as either combo boxes similar to the example above in figure 2, or as checkboxes as shown below in figure 5.&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: small;"&gt;&lt;span style="font-family: Calibri;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p align="center"&gt;&amp;nbsp;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-50-86/0488.P2_5F00_IMG5.png"&gt;&lt;img style="border: 0px currentColor;" src="http://blogs.msdn.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-50-86/0488.P2_5F00_IMG5.png" alt="" width="285" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p align="center"&gt;&lt;strong&gt;&lt;span style="font-size: small;"&gt;&lt;span style="font-family: Calibri;"&gt;Figure 5: Alternate rendering of dimension enumerations on a form&lt;/span&gt;&lt;/span&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;h4&gt;&lt;span style="font-size: small;"&gt;&lt;span style="font-family: Calibri;"&gt;Default dimensions&lt;/span&gt;&lt;/span&gt;&lt;/h4&gt;
&lt;p&gt;&lt;span style="font-size: small;"&gt;&lt;span style="font-family: Calibri;"&gt;Similar to how dimension enumerations hold a set of dimensions with an associated enumeration value; a default dimension holds a set of dimensions with specific dimension values. The name default dimensions comes from the fact that these are typically entered on master data records and not directly on transactions and are used in the defaulting of values into a ledger account combination.&amp;nbsp; Similar to dimension enumerations, there is no specific structure associated with these and in most instances the set is constrained by the consuming code to the dimensions available for the current ledger.&amp;nbsp; A default dimension is stored in the DimensionAttributeValueSet and DimensionAttributeValueSetItem tables.&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: small;"&gt;&lt;span style="font-family: Calibri;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p align="center"&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-50-86/1134.P2_5F00_IMG6.png"&gt;&lt;img style="border: 0px currentColor;" src="http://blogs.msdn.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-50-86/1134.P2_5F00_IMG6.png" alt="" width="445" /&gt;&lt;/a&gt;&amp;nbsp;&lt;/p&gt;
&lt;p align="center"&gt;&lt;strong&gt;&lt;span style="font-size: small;"&gt;&lt;span style="font-family: Calibri;"&gt;Figure 6: Default dimensions on a form&lt;/span&gt;&lt;/span&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: small;"&gt;&lt;span style="font-family: Calibri;"&gt;In the above example in figure 6, the user has selected a dimension value to associate with each dimension.&amp;nbsp; These values are stored in the DimensionAttributeValueSet and DimensionAttributeValueSetItem tables as follows:&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: small;"&gt;&lt;span style="font-family: Calibri;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p align="center"&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-50-86/6433.Fix2_5F00_7.png"&gt;&lt;img src="http://blogs.msdn.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-50-86/6433.Fix2_5F00_7.png" alt="" border="0" /&gt;&lt;/a&gt;&amp;nbsp;&lt;/p&gt;
&lt;p align="center"&gt;&lt;strong&gt;&lt;span style="font-size: small;"&gt;&lt;span style="font-family: Calibri;"&gt;Figure 7: Dimension value tables query results&lt;/span&gt;&lt;/span&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: small;"&gt;&lt;span style="font-family: Calibri;"&gt;The MainAccountLegalEntity record holds a foreign key (FK) reference to the DimensionAttributeValueSet table which represents the combination of entered values. This table represents the set of dimensions value pairs held in the DimensionAttributeValueSetItem table.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: small;"&gt;&lt;span style="font-family: Calibri;"&gt;The DimensionAttributeValueSetItem table holds one record for each entered dimension value, which references a DimensionAttributeValue.&amp;nbsp; No records are stored for a dimension that has not been entered (left blank).&amp;nbsp; In the DimensionAttributeValue table, there are now two records that were created when the default dimension was entered because the dimension value has now been used within the dimension framework. This links the dimension framework values with the backing entities.&amp;nbsp; For performance reasons, the natural key (display value) of the dimension value is stored on the DimensionAttributeValueSetItem table.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: small;"&gt;&lt;span style="font-family: Calibri;"&gt;By following the link stored in the EntityInstance field on the DimensionAttributeValue table, along with the associated ViewName on the DimensionAttribute table, we can find the record in the originating tables of CustTable (via the DimAttributeCustTable view) and DimensionFinancialTag to get to the source of the values.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: small;"&gt;&lt;span style="font-family: Calibri;"&gt;In the &lt;a title="next blog post" href="http://blogs.msdn.com/b/ax_gfm_framework_team_blog/archive/2013/02/15/ledger-account-combinations-part-3-_2800_structures-constraints_2900_-.aspx"&gt;next blog post&lt;/a&gt;, the storage of account structures and constraints will be explained.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10394027" width="1" height="1"&gt;</description></item><item><title>Ledger account combinations - Part 3 (Structures and constraints) </title><link>http://blogs.msdn.com/b/ax_gfm_framework_team_blog/archive/2013/02/15/ledger-account-combinations-part-3-_2800_structures-constraints_2900_-.aspx</link><pubDate>Fri, 15 Feb 2013 15:52:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10394028</guid><dc:creator>Bill Frandsen</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/ax_gfm_framework_team_blog/rsscomments.aspx?WeblogPostID=10394028</wfw:commentRss><comments>http://blogs.msdn.com/b/ax_gfm_framework_team_blog/archive/2013/02/15/ledger-account-combinations-part-3-_2800_structures-constraints_2900_-.aspx#comments</comments><description>&lt;h4&gt;&lt;span style="font-family: Calibri;"&gt;Introduction&lt;/span&gt;&lt;/h4&gt;
&lt;p&gt;&lt;span style="font-size: small;"&gt;&lt;span style="font-family: Calibri;"&gt;Continuing this series of blog posts, we will cover the Structures and Constraints regions highlighted in pale yellow in the model below in figure 1. &lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: small;"&gt;&lt;span style="font-family: Calibri;"&gt;As previously stated, the Dynamics AX 2012 dimension framework expanded on the previous release by allowing unlimited dimensions. Along with this change was the new ability for the user to specify which dimensions to include in which order when entering a ledger account combination and to constrain the values that can be entered for each segment in that ledger account combination.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="text-align: center;"&gt;&amp;nbsp;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-50-86/6433.P3_5F00_IMG1.png"&gt;&lt;img src="http://blogs.msdn.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-50-86/6433.P3_5F00_IMG1.png" alt="" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p align="center"&gt;&lt;strong&gt;&lt;span style="font-size: small;"&gt;&lt;span style="font-family: Calibri;"&gt;Figure 1: Structures and constraints in framework&lt;/span&gt;&lt;/span&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;h4&gt;&lt;span style="font-size: small;"&gt;&lt;span style="font-family: Calibri;"&gt;Account structures&lt;/span&gt;&lt;/span&gt;&lt;/h4&gt;
&lt;p&gt;&lt;span style="font-size: small;"&gt;&lt;span style="font-family: Calibri;"&gt;An example of an account structure appears below in figure 2:&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p align="center"&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-50-86/8168.P3_5F00_IMG2.png"&gt;&lt;img src="http://blogs.msdn.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-50-86/8168.P3_5F00_IMG2.png" alt="" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p align="center"&gt;&lt;strong&gt;&lt;span style="font-size: small;"&gt;&lt;span style="font-family: Calibri;"&gt;Figure 2: Account structure configuration form&lt;/span&gt;&lt;/span&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: small;"&gt;&lt;span style="font-family: Calibri;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: small;"&gt;&lt;span style="font-family: Calibri;"&gt;This account structure, stored in the database in the DimensionHierarchy table, is set up to require the entry of a Main account as the first segment of a ledger account combination, followed by a customer and license plate number as subsequent segments. This is the hierarchical order definition and is stored in the database in the DimensionHierarchyLevel table.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p align="center"&gt;&amp;nbsp;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-50-86/7271.Fix3_5F00_3.png"&gt;&lt;img src="http://blogs.msdn.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-50-86/7271.Fix3_5F00_3.png" alt="" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p align="center"&gt;&lt;strong&gt;&lt;span style="font-size: small;"&gt;&lt;span style="font-family: Calibri;"&gt;Figure 3: Structure query results&lt;/span&gt;&lt;/span&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: small;"&gt;&lt;span style="font-family: Calibri;"&gt;Along with the order is the definition of constraints or the criteria that defines the valid combinations of values. In this example, all segments must have a value for the combination to be considered valid.&amp;nbsp; Any existing value (already existing in the backing entity) may be entered and there are no specific restrictions on the combinations of values that are valid.&amp;nbsp; This criterion is stored in the DimensionConstraintTree, DimensionConstraintNode and DimensionConstraintNodeCriteria tables.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p align="center"&gt;&amp;nbsp;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-50-86/7750.fix3_5F00_4.png"&gt;&lt;img src="http://blogs.msdn.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-50-86/7750.fix3_5F00_4.png" alt="" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p align="center"&gt;&lt;strong&gt;&lt;span style="font-size: small;"&gt;&lt;span style="font-family: Calibri;"&gt;Figure 4: Simple constraints query results&lt;/span&gt;&lt;/span&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: small;"&gt;&lt;span style="font-family: Calibri;"&gt;The above example in figure 4 shows the most basic constraint tree. Each of the 3 constraint nodes have a * (any existing value) constraint criteria (stored as % in SQL and shown as "&amp;lt;all values&amp;gt;" in the UI) associated with them. These constraints are used to both show what values may be entered for each segment using a lookup, and validate values entered in the segment. These constraints will eventually result in validation errors if improper values are entered for a ledger account combination.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: small;"&gt;&lt;span style="font-family: Calibri;"&gt;The dimension framework allows for significantly more complex constraint trees where the value entered in on one segment drives the valid values allowed in the subsequent segment. An example of the versatility is shown below in figure 5:&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: small;"&gt;&lt;span style="font-family: Calibri;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p align="center"&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-50-86/2376.P3_5F00_IMG5.png"&gt;&lt;img src="http://blogs.msdn.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-50-86/2376.P3_5F00_IMG5.png" alt="" border="0" /&gt;&lt;/a&gt;&amp;nbsp;&lt;/p&gt;
&lt;p align="center"&gt;&lt;strong&gt;&lt;span style="font-size: small;"&gt;&lt;span style="font-family: Calibri;"&gt;Figure 5: Constraint builder form&lt;/span&gt;&lt;/span&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: small;"&gt;&lt;span style="font-family: Calibri;"&gt;Thus, a more complex constraint tree is shown in the following example:&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p align="center"&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-50-86/1460.P3_5F00_IMG6.png"&gt;&lt;img src="http://blogs.msdn.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-50-86/1460.P3_5F00_IMG6.png" alt="" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p align="center"&gt;&lt;strong&gt;&lt;span style="font-size: small;"&gt;&lt;span style="font-family: Calibri;"&gt;Figure 6: Advanced constraint tree expanded on form&lt;/span&gt;&lt;/span&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: small;"&gt;&lt;span style="font-family: Calibri;"&gt;Resulting in the following constraint definition:&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p align="center"&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-50-86/0830.Fix3_5F00_7.png"&gt;&lt;img src="http://blogs.msdn.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-50-86/0830.Fix3_5F00_7.png" alt="" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p align="center"&gt;&lt;strong&gt;&lt;span style="font-size: small;"&gt;&lt;span style="font-family: Calibri;"&gt;Figure 7: Advanced constraint tree query results&lt;/span&gt;&lt;/span&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: small;"&gt;&lt;span style="font-family: Calibri;"&gt;Note that in the case of entering [ 150 - B ] for a main account and customer, that the user must enter a specific license plate number as well. However, if the user enters [ 150 - W ] for a main account and customer, then no license plate number is required. In both cases however, the user will always see 3 segments in the ledger account combination, even if one of them is left blank. Examples of the effects of these structures, segments and constraints on the entry of a ledger dimension account will be provided in a subsequent blog post where we will discuss entry of ledger account combinations and their storage.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: small;"&gt;&lt;span style="font-family: Calibri;"&gt;In case the user would like to only show trailing segments when they are required to be entered, then advanced rules can be combined with the account structure to provide the additional versatility. Advanced rules will be explained in the &lt;a title="next blog post" href="http://blogs.msdn.com/b/ax_gfm_framework_team_blog/archive/2013/02/15/ledger-account-combinations-part-4-_2800_advanced-rules_2900_-.aspx"&gt;next blog post&lt;/a&gt;.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10394028" width="1" height="1"&gt;</description></item><item><title>Ledger account combinations - Part 1 (Dimensions)</title><link>http://blogs.msdn.com/b/ax_gfm_framework_team_blog/archive/2013/02/15/ledger-account-combinations-part-1-_2800_dimensions_2900_.aspx</link><pubDate>Fri, 15 Feb 2013 15:25:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10394017</guid><dc:creator>Bill Frandsen</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/ax_gfm_framework_team_blog/rsscomments.aspx?WeblogPostID=10394017</wfw:commentRss><comments>http://blogs.msdn.com/b/ax_gfm_framework_team_blog/archive/2013/02/15/ledger-account-combinations-part-1-_2800_dimensions_2900_.aspx#comments</comments><description>&lt;h4&gt;Introduction&lt;/h4&gt;
&lt;p&gt;&lt;span style="font-size: small;"&gt;&lt;span style="font-family: Calibri;"&gt;In Dynamics AX 2009, dimensions were limited to a minimum of three and a maximum of ten, and entered in a set order that required code customizations and database synchronization for each dimension added. In Dynamics AX 2012, the dimension framework was expanded to allow unlimited dimensions which can be dynamically created by the user, and entered in any order. The unlimited nature of the new model, coupled with taking advantage of relational database design as well as optimizing for performance requirements has led to a more complex data model than existed in the past.&amp;nbsp; In this series of blog posts, we will discuss the various areas of the dimension framework, and how they work together to give a better understanding of &amp;ldquo;What happens when I create a ledger account combination?&amp;rdquo;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: small;"&gt;&lt;span style="font-family: Calibri;"&gt;The model below in figure 1 shows the various areas within the dimension framework.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="text-align: center;"&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-50-86/5008.P1_5F00_IMG1.png"&gt;&lt;img src="http://blogs.msdn.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-50-86/5008.P1_5F00_IMG1.png" alt="" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p align="center"&gt;&lt;strong&gt;&lt;span style="font-size: small;"&gt;&lt;span style="font-family: Calibri;"&gt;Figure 1: Dimensions in framework&lt;/span&gt;&lt;/span&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: small;"&gt;&lt;span style="font-family: Calibri;"&gt;This initial blog post covers the Dimensions, Dimension Values, Categorizations and Backing Entities regions highlighted in figure 1 above in pale yellow.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: small;"&gt;&lt;span style="font-family: Calibri;"&gt;Subsequent blog posts will cover:&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;span style="font-size: small;"&gt;&lt;span style="font-family: Calibri;"&gt;&lt;a title="Dimension Enumerations and Default Dimensions" href="http://blogs.msdn.com/b/ax_gfm_framework_team_blog/archive/2013/02/15/ledger-account-combinations-part-2-_2800_dimension-enumerations-default-dimensions_2900_-.aspx"&gt;Dimension Enumerations and Default Dimensions&lt;/a&gt;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-size: small;"&gt;&lt;span style="font-family: Calibri;"&gt;&lt;a title="Structures and Constraints" href="http://blogs.msdn.com/b/ax_gfm_framework_team_blog/archive/2013/02/15/ledger-account-combinations-part-3-_2800_structures-constraints_2900_-.aspx"&gt;Structures and Constraints&lt;/a&gt;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-size: small;"&gt;&lt;span style="font-family: Calibri;"&gt;&lt;a title="Advanced Rules" href="http://blogs.msdn.com/b/ax_gfm_framework_team_blog/archive/2013/02/15/ledger-account-combinations-part-4-_2800_advanced-rules_2900_-.aspx"&gt;Advanced Rules&lt;/a&gt;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-size: small;"&gt;&lt;span style="font-family: Calibri;"&gt;&lt;a title="LedgerDimensions" href="http://blogs.msdn.com/b/ax_gfm_framework_team_blog/archive/2013/02/15/ledger-account-combinations-part-5-_2800_ledger-dimensions_2900_-.aspx"&gt;LedgerDimensions&lt;/a&gt;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-size: small;"&gt;&lt;span style="font-family: Calibri;"&gt;&lt;a title="Advanced topics  " href="http://blogs.msdn.com/b/ax_gfm_framework_team_blog/archive/2013/02/15/ledger-account-combinations-part-7-_2800_advanced-topics_2900_-.aspx"&gt;Advanced topics&lt;/a&gt; including hash keys, hashes and other key data model elements&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h4&gt;&lt;span style="font-size: small;"&gt;&lt;span style="font-family: Calibri;"&gt;Dimension Attributes&lt;/span&gt;&lt;/span&gt;&lt;/h4&gt;
&lt;p&gt;&lt;span style="font-size: small;"&gt;&lt;span style="font-family: Calibri;"&gt;A dimension attribute, which will be referred to as a dimension, simply represents an additional piece of classifying information that a user would like to associate with a ledger account combination. It represents classes of things, not specific instances. Examples of things that can be used to create a dimension are Department, Cost Center, Expense Purpose, Customer, Vendor, Item &amp;ndash; which are all classes of entities that already exist in the system; or custom entities that are specific to a particular installation such as license plate number or event name or ticket number. &lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: small;"&gt;&lt;span style="font-family: Calibri;"&gt;When a dimension is created, the user chooses to use values for it from either an existing entity in the system such as Customers or Departments, or to create a custom list. The dimension framework keeps track of a reference for this dimension to a table in the system.&amp;nbsp; For existing entities such as Customers, a reference to the CustTable table is used.&amp;nbsp; For custom entities that are defined by the user, a reference to the DimensionFinancialTag table is used.&amp;nbsp; This metadata about what a dimension represents is stored in the DimensionAttribute table for each dimension defined.&lt;/span&gt;&lt;/span&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: small;"&gt;&lt;span style="font-family: Calibri;"&gt;The following form shows an example of two dimensions, one to represent customers that already exist in the application, and another that represents a new custom list. &lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p align="center"&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-50-86/4174.P1_5F00_IMG2.png"&gt;&lt;img src="http://blogs.msdn.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-50-86/4174.P1_5F00_IMG2.png" alt="" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p align="center"&gt;&lt;strong&gt;&lt;span style="font-size: small;"&gt;&lt;span style="font-family: Calibri;"&gt;Figure 2: Financial dimensions form&lt;/span&gt;&lt;/span&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: small;"&gt;&lt;span style="font-family: Calibri;"&gt;The data is stored in the DimensionAttribute table. The SQL query below in figure 3 shows some of the basic information associated with each dimension. &lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p align="center"&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-50-86/0334.P1_5F00_IMG3.png"&gt;&lt;img src="http://blogs.msdn.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-50-86/0334.P1_5F00_IMG3.png" alt="" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p align="center"&gt;&lt;strong&gt;&lt;span style="font-size: small;"&gt;&lt;span style="font-family: Calibri;"&gt;Figure 3: DimensionAttribute storage query results&lt;/span&gt;&lt;/span&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: small;"&gt;&lt;span style="font-family: Calibri;"&gt;The Type determines whether the dimension is backed by an existing entity in the system or a custom list.&amp;nbsp; It is also important to note that the dimension framework does not directly reference the existing entity backing table such as CustTable. Instead, a custom view is created to make an entity available in the system for use in the dimension framework. As of Dynamics AX 2012 R2, 36 existing entities have been enabled to be used as dimensions in the system.&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: small;"&gt;&lt;span style="font-family: Calibri;"&gt;It is possible for a user to create more than one dimension based on the same entity. There may be instances where an entity in the system is used for multiple different purposes when classifying transaction activity in the system.&amp;nbsp; In this case, multiple dimensions can be defined for it, one for each of its purposes.&amp;nbsp; A common example would be a cost center backing entity used to represent the primary cost center (e.g. selling) and the cost center the transaction is being traded against (e.g. purchasing).&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: small;"&gt;&lt;span style="font-family: Calibri;"&gt;Internally, special dimensions exist that are automatically created to support key functionality of the dimension framework. A primary example is the Main Account dimension. This allows a main account to be treated as a dimension by the dimension framework, but also prevents it from being used by a user to create a dimension. The other types of special dimensions are system generated ones that are used by the dimension framework for internal purposes.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;h4&gt;&lt;span style="font-size: small;"&gt;&lt;span style="font-family: Calibri;"&gt;Dimension Attribute Values&lt;/span&gt;&lt;/span&gt;&lt;/h4&gt;
&lt;p&gt;&lt;span style="font-size: small;"&gt;&lt;span style="font-family: Calibri;"&gt;A dimension attribute value is a specific instance of a dimension used within the dimension framework. The values for a dimension are determined by the ViewName specified on the DimensionAttribute record. In the case of an existing entity, such as CustTable, values consist of the records in that table. In the case of a custom list, it is a specific set of records within the DimensionFinancialTag table.&amp;nbsp; Values that are available for a particular dimension are viewable by clicking the &amp;ldquo;Financial dimension values&amp;rdquo; button on the Dimension details form as shown in figure 2 above. When the list is provided by an existing entity, such as CustTable, it is not editable from this form. To create a new dimension value for Customer, the user would go directly to the Customer form and create a new customer.&amp;nbsp; Once created, the new customer will become available for use in the dimension framework. When the list is provided by the user as a custom list, the user will be able to modify the list directly on this form. &lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: small;"&gt;&lt;span style="font-family: Calibri;"&gt;Example of a list of values provided by CustTable (with no values stored in the dimension framework):&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p align="center"&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-50-86/8461.P1_5F00_IMG4.jpg"&gt;&lt;img src="http://blogs.msdn.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-50-86/8461.P1_5F00_IMG4.jpg" alt="" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p align="center"&gt;&lt;span style="font-size: small;"&gt;&lt;span style="font-family: Calibri;"&gt; &lt;strong&gt;Figure 4: Financial dimensions values form (existing list)&lt;/strong&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;span style="font-size: small;"&gt;&lt;span style="font-family: Calibri;"&gt;Example when provided by a custom list (with values stored in the dimension framework):&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p align="center"&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-50-86/3716.P1_5F00_IMG5.jpg"&gt;&lt;img src="http://blogs.msdn.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-50-86/3716.P1_5F00_IMG5.jpg" alt="" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p align="center"&gt;&amp;nbsp;&lt;span style="font-size: small;"&gt;&lt;span style="font-family: Calibri;"&gt;&amp;nbsp;&lt;strong&gt;Figure 5: Financial dimensions form (custom list)&lt;/strong&gt;&lt;/span&gt;&lt;/span&gt;&lt;strong&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;p align="center"&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-50-86/8637.Fix1_5F00_6.png"&gt;&lt;img src="http://blogs.msdn.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-50-86/8637.Fix1_5F00_6.png" alt="" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p align="center"&gt;&lt;strong&gt;&lt;span style="font-size: small;"&gt;&lt;span style="font-family: Calibri;"&gt;Figure 6: Dimension setup tables query results&lt;/span&gt;&lt;/span&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;p style="text-align: left;" align="center"&gt;&lt;span style="font-size: small;"&gt;&lt;span style="font-family: Calibri;"&gt;In both of these cases, the Financial dimension values form is displaying what values exist for the entity, not what values have actually been used within the dimension framework.&amp;nbsp; The dimension framework representation of these values is not created until it is used within the framework requiring it to hold a reference to it. This allows for the ability for values to be deleted that have not yet been used, and for storage size and performance optimization. &lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: small;"&gt;&lt;span style="font-family: Calibri;"&gt;Once a dimension value is referenced requiring it to be saved by the dimension framework, it is stored in the DimensionAttributeValue table.&amp;nbsp; This table is the link between the DimensionAttribute and the specific RecId of the record in the ViewName view or table referenced on the DimensionAttribute. Both the DimensionAttribute and DimensionAttributeValue records are needed to navigate back to the originating value that the user has entered.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: small;"&gt;&lt;span style="font-family: Calibri;"&gt;In a system where nothing has been referenced by the dimension framework, there will be no records in the DimensionAttributeValue table.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;div&gt;
&lt;p&gt;&lt;span style="font-size: small;"&gt;&lt;span style="font-family: Calibri;"&gt;In the &lt;a title="next blog post" href="http://blogs.msdn.com/b/ax_gfm_framework_team_blog/archive/2013/02/15/ledger-account-combinations-part-2-_2800_dimension-enumerations-default-dimensions_2900_-.aspx"&gt;next blog post&lt;/a&gt;, the storage of dimensions as dimension enumerations and of dimension values as default dimensions will be explained.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10394017" width="1" height="1"&gt;</description></item><item><title>The Microsoft Dynamics AX 2012 extension framework – Part 3</title><link>http://blogs.msdn.com/b/ax_gfm_framework_team_blog/archive/2012/11/13/the-microsoft-dynamics-ax-2012-extension-framework-part-3.aspx</link><pubDate>Tue, 13 Nov 2012 18:14:30 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10368143</guid><dc:creator>Arthur Reginald Greef</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/ax_gfm_framework_team_blog/rsscomments.aspx?WeblogPostID=10368143</wfw:commentRss><comments>http://blogs.msdn.com/b/ax_gfm_framework_team_blog/archive/2012/11/13/the-microsoft-dynamics-ax-2012-extension-framework-part-3.aspx#comments</comments><description>&lt;h1&gt;&lt;span style="font-family: Calibri;"&gt;&lt;span style="font-size: small;"&gt;Arthur Greef and&amp;nbsp;Michael Gall.&lt;/span&gt;&lt;/span&gt;&lt;/h1&gt;
&lt;p&gt;&lt;span style="font-family: Calibri;"&gt;&lt;span style="font-size: small;"&gt;In part 1 of this blog entry series, we explained how classes can be extended by using the Microsoft Dynamics AX 2012 extension framework and statically declared class attributes. In part 2, we described the application model elements and application model attributes that are used to extend any application object tree (AOT) object dynamically. In this blog entry, we explain to how to use model attributes and model elements to program dynamic object extensions. &lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;h3&gt;&lt;span style="color: #4f81bd;"&gt;&lt;span style="font-family: Cambria;"&gt;&lt;span style="font-size: small;"&gt;Using model elements as model attributes to program dynamic object extensions&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/h3&gt;
&lt;p&gt;&lt;span style="font-size: small;"&gt;&lt;span style="font-family: Calibri;"&gt;The following example shows how to create a model element object from the &lt;/span&gt;DocumentType&lt;span style="font-family: Calibri;"&gt; base enumeration and to then use the model element to create an instance of a model attribute. The resulting model attribute is then used to cache an extension point for the &lt;/span&gt;InventoryPolicy1&lt;span style="font-family: Calibri;"&gt; class.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: small;"&gt;&lt;strong&gt;public&lt;/strong&gt; &lt;strong&gt;void&lt;/strong&gt; build()&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: small;"&gt;{&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: small;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; SysExtModelElement&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; element;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: small;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; element = SysExtModelElementAppFactory::newFromEnum(&lt;strong&gt;enumNum&lt;/strong&gt;(DocumentType), DocumentType::Doc1);&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: small;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; SysExtension::addExtension(&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; SysExtModelElementAppFactory::newFromClassName(&lt;strong&gt;classStr&lt;/strong&gt;(InventoryPolicy1)).parmCacheKey(),&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; SysExtModelAttributeInstanceFactory::newFromElement(element).parmCacheKey());&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: small;"&gt;}&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: small;"&gt;&lt;span style="font-family: Calibri;"&gt;This extension point could be used to extend the &lt;/span&gt;FormLetterJournalCreate&lt;span style="font-family: Calibri;"&gt; class instead of using the &lt;/span&gt;FormLetterJournalCreate.newSalesJournalCreate&lt;span style="font-family: Calibri;"&gt; factory method currently implemented in Microsoft Dynamics AX 2012. Both methods use the &lt;/span&gt;DocumentType&lt;span style="font-family: Calibri;"&gt; base enumerator to identify class extension points. The extension framework, however, will decouple the base &lt;/span&gt;FormLetterJournalCreate&lt;span style="font-family: Calibri;"&gt; declaration from its extensions.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;h3&gt;&lt;span style="color: #4f81bd;"&gt;&lt;span style="font-family: Cambria;"&gt;&lt;span style="font-size: small;"&gt;Checking extension design constraints&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/h3&gt;
&lt;p&gt;&lt;span style="font-size: small;"&gt;&lt;span style="font-family: Calibri;"&gt;The &lt;/span&gt;SysExtensionValidatorStrategy&lt;span style="font-family: Calibri;"&gt; class can be extended to check that extensions meet design constraints. For example, an extension validator can be used to check if more than one extension point maps the same model element to more than one class extension. An exception can be thrown if a design constraint requires a model element to uniquely identify a class extension. &lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p align="center"&gt;&lt;span style="font-size: small;"&gt;&lt;span style="font-family: Calibri;"&gt;&amp;nbsp; &lt;img src="http://blogs.msdn.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-76-69/2604.fig1.PNG" alt="" border="0" /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: small;"&gt;&lt;span style="font-family: Calibri;"&gt;The extension framework provides the &lt;/span&gt;SysExtAppClassUniqueValidator&lt;span style="font-family: Calibri;"&gt; class that enforces a unique model attribute-class extension constraint for all extension classes in a class hierarchy. You can implement your own &lt;/span&gt;SysExtensionValidatorStrategy,&lt;span style="font-family: Calibri;"&gt; and in the validate method you can implement additional validation logic (such as, allowing only extensions with particular model attributes, and so on). The validators will be executed after the dynamic builders have been executed.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;h3&gt;&lt;span style="color: #4f81bd;"&gt;&lt;span style="font-family: Cambria;"&gt;&lt;span style="font-size: small;"&gt;Runtime extension manipulation&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/h3&gt;
&lt;p&gt;&lt;span style="font-family: Calibri;"&gt;&lt;span style="font-size: small;"&gt;Model attribute extensions can be manipulated at runtime. For example, a model attribute instance that is assigned to a particular model element can be replaced with a different model attribute instance as the following example shows. &lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: small;"&gt;&lt;strong&gt;static void &lt;/strong&gt;RuntimeExtension(Args _args&lt;strong&gt;)&lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: small;"&gt;{&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: small;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; SysExtModelElementApp&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; element;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: small;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; SysExtModelAttributeInstance&amp;nbsp;&amp;nbsp;&amp;nbsp; attributeInstance;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: small;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: small;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; // Get the element where you want to replace something&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: small;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; element = SysExtModelElementAppFactory::newFromClassName(classStr(PCAdaptor));&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: small;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: small;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; // Get the new attribute instance that you would like to set&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: small;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; attributeInstance = SysExtModelAttributeInstanceFactory::newFromValue('NewValue');&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: small;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: small;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; // Set for the element the new attribute instance&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: small;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; SysExtension::replace(element, attributeInstance);&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: small;"&gt;}&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10368143" width="1" height="1"&gt;</description></item><item><title>The Microsoft Dynamics AX 2012 extension framework – Part 2</title><link>http://blogs.msdn.com/b/ax_gfm_framework_team_blog/archive/2012/11/13/the-microsoft-dynamics-ax-2012-extension-framework-part-2.aspx</link><pubDate>Tue, 13 Nov 2012 18:13:19 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10368140</guid><dc:creator>Arthur Reginald Greef</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/ax_gfm_framework_team_blog/rsscomments.aspx?WeblogPostID=10368140</wfw:commentRss><comments>http://blogs.msdn.com/b/ax_gfm_framework_team_blog/archive/2012/11/13/the-microsoft-dynamics-ax-2012-extension-framework-part-2.aspx#comments</comments><description>&lt;p&gt;&lt;span style="font-size: small;"&gt;&lt;span style="font-family: Calibri;"&gt;Arthur Greef and&amp;nbsp;Michael Gall.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: small;"&gt;&lt;span style="font-family: Calibri;"&gt;In this blog entry we examine the new extension framework that was shipped with Microsoft Dynamics AX 2012. In part 1 of this series, we explained how the extension framework can be used to instantiate objects from derived classes that are decorated with static class attributes. This design pattern should be used when derived class customizations are located in only one application object layer and if the customization does not change the class attribute specification that is used to annotate a derived class. &lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: small;"&gt;&lt;span style="font-family: Calibri;"&gt;If a derived class is customized in more than one application object layer or in more than one application model, or if the class-attribute class specification is customized, then dynamic model element attributes must be used in place of static class attributes. This is because derived class customizations and class attribute customizations are merged at runtime.&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: small;"&gt;&lt;span style="font-family: Calibri;"&gt;This blog entry describes the model attribute design and shows how these attributes can be dynamically associated with application model elements at runtime. In the next blog entry, we&amp;rsquo;ll show how these dynamic attributes are used to dynamically extend the Microsoft Dynamics AX application.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: small;"&gt;&lt;span style="font-family: Calibri;"&gt;There are two parts to this design. The first part describes how application model elements are identified by the extension framework, and the second part of the design describes how to dynamically associate dynamic attributes to these application model elements.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;h2&gt;&lt;span style="font-size: medium;"&gt;&lt;span style="color: #4f81bd;"&gt;&lt;span style="font-family: Cambria;"&gt;Model elements&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/h2&gt;
&lt;p&gt;&lt;span style="font-size: small;"&gt;&lt;span style="font-family: Calibri;"&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-76-69/1882.Fig1.PNG"&gt;&lt;img src="http://blogs.msdn.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-76-69/1882.Fig1.PNG" alt="" width="432" height="128" border="0" /&gt;&lt;/a&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: small;"&gt;&lt;span style="font-family: Calibri;"&gt;The extension framework maintains a cache of model element objects that identify application object tree (AOT) model elements by name. Model elements are stored and retrieved by using a cache key that is composed of the application model element name and the &lt;/span&gt;classId&lt;span style="font-family: Calibri;"&gt; of the &lt;/span&gt;SysExtModelElement&lt;span style="font-family: Calibri;"&gt; base class or the &lt;/span&gt;classId&lt;span style="font-family: Calibri;"&gt; of a class that is derived from the &lt;/span&gt;SysExtModelElement&lt;span style="font-family: Calibri;"&gt; base class. Model elements identify run-time class specifications that can be decorated with model attributes. Model elements can either be -defined by a developer or they must reference any type of AOT object that can be identified with an AOT path. Note that all AOT model elements, not only classes, can be decorated with dynamic model elements. &lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;h2&gt;&lt;span style="font-size: medium;"&gt;&lt;span style="color: #4f81bd;"&gt;&lt;span style="font-family: Cambria;"&gt;Model attributes&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/h2&gt;
&lt;p&gt;&lt;span style="color: #4f81bd; font-family: Cambria; font-size: medium;"&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-76-69/4265.Fig2.PNG"&gt;&lt;img src="http://blogs.msdn.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-76-69/4265.Fig2.PNG" alt="" width="443" height="239" border="0" /&gt;&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: small;"&gt;&lt;span style="font-family: Calibri;"&gt;A model element can be assigned one or more model attributes. Model elements themselves can serve as attributes as well. Model attributes have a name, and they have a property map that stores the name and the type of attribute properties. A model attribute instance is an instance of a model attribute with one or more property-value assignments. The extension framework provides a &lt;/span&gt;SysExtModelAttributeFactory&lt;span style="font-family: Calibri;"&gt; for creating model attribute instances as shown in the following code example.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: courier new,courier; font-size: x-small;"&gt;&lt;strong&gt;static&lt;/strong&gt; &lt;strong&gt;void&lt;/strong&gt; createAttributeInstance_Factory(Args _args)&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: courier new,courier; font-size: x-small;"&gt;{&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: courier new,courier; font-size: x-small;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; SysExtModelAttributeInstance&amp;nbsp;&amp;nbsp;&amp;nbsp; attributeInstance;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: courier new,courier; font-size: x-small;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: courier new,courier; font-size: x-small;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; // Create an instance of a model attribute named&amp;lsquo;String&amp;rsquo; that&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: courier new,courier; font-size: x-small;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; // comprises one property named &amp;lsquo;String&amp;rsquo;that is assigned the value &amp;lsquo;A&amp;rsquo;.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: courier new,courier; font-size: x-small;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; attributeInstance = SysExtModelAttributeInstanceFactory::newFromValue('A');&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: courier new,courier; font-size: x-small;"&gt;}&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: small;"&gt;&lt;span style="font-family: Calibri;"&gt;The following code example shows how custom attribute instances can be created. This example is for illustration only. The extension framework provides model attribute, property map, property-value map, and model attribute instance factory classes that should be used instead.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: courier new,courier; font-size: x-small;"&gt;&lt;strong&gt;static&lt;/strong&gt; &lt;strong&gt;void&lt;/strong&gt; createAttributeInstance_Custom(Args _args)&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: courier new,courier; font-size: x-small;"&gt;{&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: courier new,courier; font-size: x-small;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; SysExtModelAttribute&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; attribute;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: courier new,courier; font-size: x-small;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; SysExtModelAttributeName&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; attributeName;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: courier new,courier; font-size: x-small;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; SysExtModelPropertyName&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; propertyName1, propertyName2;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: courier new,courier; font-size: x-small;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; SysExtModelAttributeInstance&amp;nbsp;&amp;nbsp;&amp;nbsp; attributeInstance;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: courier new,courier; font-size: x-small;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Map&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; propertyMap;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: courier new,courier; font-size: x-small;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Map&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; propertyValueMap;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: courier new,courier; font-size: x-small;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: courier new,courier; font-size: x-small;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;em&gt;// Set the name of the attribute&lt;/em&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: courier new,courier; font-size: x-small;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; attributeName = 'MyAttribute';&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: courier new,courier; font-size: x-small;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; propertyName1 = 'MyProperty1';&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: courier new,courier; font-size: x-small;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; propertyName2 = 'MyProperty2';&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: courier new,courier; font-size: x-small;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: courier new,courier; font-size: x-small;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;em&gt;// Create property map&lt;/em&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: courier new,courier; font-size: x-small;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; propertyMap = &lt;strong&gt;new&lt;/strong&gt; Map(Types::String, Types::Enum);&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: courier new,courier; font-size: x-small;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; propertyMap.insert(propertyName1, Types::String);&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: courier new,courier; font-size: x-small;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; propertyMap.insert(propertyName2, Types::Integer);&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: courier new,courier; font-size: x-small;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: courier new,courier; font-size: x-small;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; attribute = SysExtModelAttribute::newFromParameters(attributeName, propertyMap);&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: courier new,courier; font-size: x-small;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: courier new,courier; font-size: x-small;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;em&gt;// Create property map&lt;/em&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: courier new,courier; font-size: x-small;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; propertyValueMap = &lt;strong&gt;new&lt;/strong&gt; Map(Types::String, Types::Container);&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: courier new,courier; font-size: x-small;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; propertyValueMap.insert(propertyName1, 'PropertyValue1');&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: courier new,courier; font-size: x-small;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; propertyValueMap.insert(propertyName2, &lt;strong&gt;2&lt;/strong&gt;);&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: courier new,courier; font-size: x-small;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: courier new,courier; font-size: x-small;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; attributeInstance = SysExtModelAttributeInstance::newFromParameters(attribute, propertyValueMap);&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: courier new,courier; font-size: x-small;"&gt;}&lt;/span&gt;&lt;/p&gt;
&lt;h2&gt;&lt;span style="font-size: medium;"&gt;&lt;span style="color: #4f81bd;"&gt;&lt;span style="font-family: Cambria;"&gt;Model element extensions&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/h2&gt;
&lt;p&gt;&lt;span style="color: #4f81bd; font-family: Cambria; font-size: medium;"&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-76-69/7536.Fig3.PNG"&gt;&lt;img src="http://blogs.msdn.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-76-69/7536.Fig3.PNG" alt="" border="0" /&gt;&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: small;"&gt;&lt;span style="font-family: Calibri;"&gt;A dynamic and run-time model element extension is specified by binding a model element to one or more model attribute instances. Model element extensions are stored in the &lt;/span&gt;SysGlobalObjectCache.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: small;"&gt;&lt;span style="font-family: Calibri;"&gt;The next blog entry (part 3) will demonstrate how the extension framework uses these model element extension objects for various dynamic and run-time extension scenarios. &lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10368140" width="1" height="1"&gt;</description></item><item><title>The Microsoft Dynamics AX 2012 extension framework – Part 1</title><link>http://blogs.msdn.com/b/ax_gfm_framework_team_blog/archive/2012/11/13/the-microsoft-dynamics-ax-2012-extension-framework-part-1.aspx</link><pubDate>Tue, 13 Nov 2012 18:11:36 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10368139</guid><dc:creator>Arthur Reginald Greef</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/ax_gfm_framework_team_blog/rsscomments.aspx?WeblogPostID=10368139</wfw:commentRss><comments>http://blogs.msdn.com/b/ax_gfm_framework_team_blog/archive/2012/11/13/the-microsoft-dynamics-ax-2012-extension-framework-part-1.aspx#comments</comments><description>&lt;p&gt;&lt;span style="font-family: Calibri;"&gt;&lt;span style="font-size: small;"&gt;Arthur Greef and&amp;nbsp;Michael Gall.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: Calibri;"&gt;&lt;span style="font-size: small;"&gt;Microsoft Dynamics AX 2012 includes a new extension framework that can be used to reduce coupling between application foundation frameworks and their extensions. &lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: Calibri;"&gt;&lt;span style="font-size: small;"&gt;This is the first part in a series of blogs that describes the design of the extension framework and gives examples of where this framework is used in Microsoft Dynamics AX 2012.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: Calibri;"&gt;&lt;span style="font-size: small;"&gt;A typical design pattern used to extend Microsoft Dynamics AX capability is found in the bill of material (BOM) consumption calculation design. There are four parts to the extension design. The first part of the design specifies a base enumeration for each of the calculation formulas.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;table border="1" cellspacing="0" cellpadding="0"&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td valign="top" width="638"&gt;
&lt;div&gt;
&lt;p&gt;&lt;span style="font-family: courier new,courier; font-size: small;"&gt;&lt;span&gt;Base enum&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: courier new,courier; font-size: small;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; BOMFormula&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Formula0&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Formula1&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ...&lt;/span&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: small;"&gt;&lt;span style="font-family: Calibri;"&gt;The second part of the design specifies a base class and base class extensions.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;table border="1" cellspacing="0" cellpadding="0"&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td valign="top" width="638"&gt;
&lt;div&gt;
&lt;p&gt;&lt;span style="font-family: courier new,courier; font-size: small;"&gt;&lt;span&gt;AOT/Classes&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: courier new,courier; font-size: small;"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; class BOMCalcConsumption{}&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; class BOMCalcConsumption_Formula0 extends BOMCalcConsumption {}&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; class BOMCalcConsumption_Formula1 extends BOMCalcConsumption {}&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;hellip;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: Calibri;"&gt;&lt;span style="font-size: small;"&gt;The third part of the design specifies a static factory method on the base class that uses the value of a base enumeration parameter to instantiate a derived class.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;table border="1" cellspacing="0" cellpadding="0"&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td valign="top" width="638"&gt;
&lt;div&gt;
&lt;p&gt;&lt;span style="font-family: courier new,courier;"&gt;&lt;span style="font-size: small;"&gt;&lt;strong&gt;class &lt;/strong&gt;BOMCalcConsumption&lt;/span&gt;&lt;strong&gt;&lt;span style="font-size: small;"&gt; &lt;br /&gt;{&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; client&lt;/span&gt;&lt;/strong&gt;&lt;span style="font-size: small;"&gt; &lt;strong&gt;server&lt;/strong&gt; &lt;strong&gt;static&lt;/strong&gt; BOMCalcConsumption construct(&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; BOMFormula&amp;nbsp; formula, BOMCalcData calcData)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;strong&gt;switch&lt;/strong&gt; (formula)&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: courier new,courier; font-size: small;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: courier new,courier;"&gt;&lt;strong&gt;&lt;span style="font-size: small;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; case&lt;/span&gt;&lt;/strong&gt;&lt;span style="font-size: small;"&gt; BOMFormula::Formula0:&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;strong&gt;return&lt;/strong&gt; &lt;strong&gt;new&lt;/strong&gt; BOMCalcConsump_Formula0(calcData);&lt;br /&gt;&lt;strong&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; case&lt;/strong&gt; BOMFormula::Formula1:&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;strong&gt;return&lt;/strong&gt; &lt;strong&gt;new&lt;/strong&gt; BOMCalcConsump_Formula1(calcData);&lt;br /&gt;&lt;/span&gt;&lt;span style="font-size: small;"&gt;&lt;strong&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ...&lt;br /&gt;&lt;/strong&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;&lt;strong&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return&lt;/strong&gt; &lt;strong&gt;new&lt;/strong&gt; BOMCalcConsump_Formula0(calcData);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;&lt;/span&gt;&lt;span style="font-size: small;"&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: small;"&gt;&lt;span style="font-family: Calibri;"&gt;In the preceding design example, the base class is tightly coupled to derived classes and needs to be modified each time that a new derived class is added to the application. In addition, a new enumeration must be added to the base enumeration. A less tightly coupled extension design that uses a class attribute and a class factory is now possible and has been used for product configuration adaptor extensions. &lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: small;"&gt;&lt;span style="font-family: Calibri;"&gt;The extension framework uses the class attribute framework and class factory framework that is also new to Microsoft Dynamics AX 2012. These two frameworks are used to decouple base and derived classes in two steps.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="padding-left: 30px;"&gt;&lt;span style="font-family: Calibri; font-size: small;"&gt;1.&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="font-size: small;"&gt;&lt;span style="font-family: Calibri;"&gt;Create a class attribute method by extending the &lt;/span&gt;SysAttribute&lt;span style="font-family: Calibri;"&gt; class. &lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: Calibri;"&gt;&lt;span style="font-size: small;"&gt;The following example is taken from the product configuration code in the Product information management module.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;table border="1" cellspacing="0" cellpadding="0"&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td valign="top" width="638"&gt;
&lt;p&gt;&lt;span style="font-family: courier new,courier;"&gt;&lt;strong&gt;&lt;span style="font-size: small;"&gt;class&lt;/span&gt;&lt;/strong&gt;&lt;span style="font-size: small;"&gt; PcAdaptorExtensionAttribute &lt;strong&gt;extends&lt;/strong&gt; SysAttribute&lt;br /&gt;{&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; PCName modelName;&lt;br /&gt;&lt;/span&gt;&lt;strong&gt;&lt;br /&gt;&lt;span style="font-size: small;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; public&lt;/span&gt;&lt;/strong&gt;&lt;span style="font-size: small;"&gt; &lt;strong&gt;void&lt;/strong&gt; &lt;strong&gt;new&lt;/strong&gt;(PCName _modelName)&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: courier new,courier; font-size: small;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: courier new,courier; font-size: small;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;strong&gt;super&lt;/strong&gt;();&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: courier new,courier; font-size: small;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;strong&gt;if&lt;/strong&gt; (_modelName == '')&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: courier new,courier; font-size: small;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: courier new,courier; font-size: small;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;strong&gt;throw&lt;/strong&gt; error(Error::missingParameter(this));&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: courier new,courier; font-size: small;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: courier new,courier; font-size: small;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; modelName = _modelName;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: courier new,courier; font-size: small;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: courier new,courier; font-size: small;"&gt;&lt;strong&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; public&lt;/strong&gt; PCName parmModelName(PCName _modelName = modelName)&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: courier new,courier; font-size: small;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: courier new,courier; font-size: small;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; modelName = _modelName;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: courier new,courier; font-size: small;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;strong&gt;return&lt;/strong&gt; modelName;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: courier new,courier; font-size: small;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: courier new,courier; font-size: small;"&gt;}&lt;/span&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="padding-left: 30px;"&gt;&lt;span style="font-family: Calibri; font-size: small;"&gt;2.&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="font-size: small;"&gt;&lt;span style="font-family: Calibri;"&gt;Use the preceding class attribute to add metadata to a derived class. &lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: small;"&gt;&lt;span style="font-family: Calibri;"&gt;For example, add the following code to extend the &lt;/span&gt;PCAdaptor&lt;span style="font-family: Calibri;"&gt; class so that a MyPCAdaptor object is created instead of a PCAdaptor object when processing a product configuration that is created from a product configuration model named &amp;ldquo;Computers&amp;rdquo;.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;table border="1" cellspacing="0" cellpadding="0"&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td valign="top" width="638"&gt;
&lt;p&gt;&lt;span style="font-family: courier new,courier; font-size: small;"&gt;[PCAdaptorExtensionAttribute('Computers')]&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: courier new,courier; font-size: small;"&gt;&lt;strong&gt;class&lt;/strong&gt; MyPCAdaptor &lt;strong&gt;extends&lt;/strong&gt; PCAdaptor&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: courier new,courier; font-size: small;"&gt;{&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: courier new,courier; font-size: small;"&gt;&lt;strong&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; protected&lt;/strong&gt; &lt;strong&gt;void&lt;/strong&gt; &lt;strong&gt;new&lt;/strong&gt;()&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: courier new,courier; font-size: small;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: courier new,courier; font-size: small;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;strong&gt;super&lt;/strong&gt;();&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: courier new,courier; font-size: small;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: courier new,courier; font-size: small;"&gt;}&lt;/span&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: small;"&gt;&lt;span style="font-family: Calibri;"&gt;You can test that this extension works by performing the following steps.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="padding-left: 30px;"&gt;&lt;span style="font-family: Calibri; font-size: small;"&gt;1.&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="font-size: small;"&gt;&lt;span style="font-family: Calibri;"&gt;Open the Microsoft Dynamics AX development environment.&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: Calibri; font-size: small;"&gt;2.&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="font-size: small;"&gt;&lt;span style="font-family: Calibri;"&gt;Add the &lt;/span&gt;MyPCAdaptor&lt;span style="font-family: Calibri;"&gt; class to the Application Object Tree (AOT), and then compile the class.&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: Calibri; font-size: small;"&gt;3.&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="font-size: small;"&gt;&lt;span style="font-family: Calibri;"&gt;Add a breakpoint in the &lt;/span&gt;PCAdaptorFactory.getAdaptorFromModelName&lt;span style="font-family: Calibri;"&gt; method.&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: Calibri; font-size: small;"&gt;4.&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="font-size: small;"&gt;&lt;span style="font-family: Calibri;"&gt;Open the Microsoft Dynamics AX client.&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: Calibri; font-size: small;"&gt;5.&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="font-size: small;"&gt;&lt;span style="font-family: Calibri;"&gt;Click &lt;strong&gt;Product information management&lt;/strong&gt; &amp;gt;&lt;strong&gt;Common&lt;/strong&gt; &amp;gt;&lt;strong&gt;Product configuration models&lt;/strong&gt;. &lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: Calibri; font-size: small;"&gt;6.&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="font-size: small;"&gt;&lt;span style="font-family: Calibri;"&gt;On the action pane, in the &lt;strong&gt;New &lt;/strong&gt;group, click Product configuration model.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: small;"&gt;&lt;span style="font-family: Calibri;"&gt;The &lt;strong&gt;New product configuration model &lt;/strong&gt;dialog opens.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="padding-left: 30px;"&gt;&lt;span style="font-family: Calibri; font-size: small;"&gt;7.&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="font-size: small;"&gt;&lt;span style="font-family: Calibri;"&gt;Enter &amp;ldquo;Computers&amp;rdquo; in the &lt;strong&gt;Name&lt;/strong&gt; field.&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: Calibri; font-size: small;"&gt;8.&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="font-size: small;"&gt;&lt;span style="font-family: Calibri;"&gt;Enter a name in the &lt;strong&gt;Root component &lt;/strong&gt;section &lt;strong&gt;Name&lt;/strong&gt; field, and then click &lt;strong&gt;OK&lt;/strong&gt;.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: small;"&gt;&lt;span style="font-family: Calibri;"&gt;The &lt;strong&gt;Constraint-based product configuration model details &lt;/strong&gt;form opens.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="padding-left: 30px;"&gt;&lt;span style="font-family: Calibri; font-size: small;"&gt;9.&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="font-size: small;"&gt;&lt;span style="font-family: Calibri;"&gt;Add an attribute to the root component in the &lt;strong&gt;Attributes &lt;/strong&gt;section.&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: Calibri; font-size: small;"&gt;10.&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="font-size: small;"&gt;&lt;span style="font-family: Calibri;"&gt;On the action pane, in the &lt;strong&gt;Run &lt;/strong&gt;group, click &lt;strong&gt;Test&lt;/strong&gt;.&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: Calibri; font-size: small;"&gt;11.&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="font-size: small;"&gt;&lt;span style="font-family: Calibri;"&gt;Select a value for the attribute.&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: Calibri; font-size: small;"&gt;12.&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="font-size: small;"&gt;&lt;span style="font-family: Calibri;"&gt;Click &lt;strong&gt;OK&lt;/strong&gt;.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: small;"&gt;&lt;span style="font-family: Calibri;"&gt;The Microsoft Dynamics AX debugger should launch at the breakpoint added in step 3 in the preceding step list. &lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: small;"&gt;&lt;span style="font-family: Calibri;"&gt;As you step though the code you will see how the SysExtensionAppClassFactory is used to create an instance of the &lt;/span&gt;MyPCAdaptor&lt;span style="font-family: Calibri;"&gt; class.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;table border="1" cellspacing="0" cellpadding="0"&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td valign="top" width="638"&gt;
&lt;p&gt;&lt;span style="font-family: courier new,courier; font-size: small;"&gt;adaptor = SysExtensionAppClassFactory::getClassFromSysAttribute(classStr(PCAdaptor), extensionAttribute);&lt;/span&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: small;"&gt;&lt;span style="font-family: Calibri;"&gt;The &lt;/span&gt;getClassFromSysAttribute&lt;span style="font-family: Calibri;"&gt; method works by searching through the classes that are derived from the &lt;/span&gt;PCAdaptor&lt;span style="font-family: Calibri;"&gt; class until it finds a class that has a &lt;/span&gt;PCAdaptorExtensionAttribute&lt;span style="font-family: Calibri;"&gt; that returns a product model name that matches the name of the product configuration model being tested. In this case, the name &amp;ldquo;Computers&amp;rdquo;.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: small;"&gt;&lt;span style="font-family: Calibri;"&gt;The benefits of using this new extension model are that the base and derived classes are decoupled, and it takes less code to extend the capability of the Microsoft Dynamics AX application.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10368139" width="1" height="1"&gt;</description></item><item><title>Batch processing for dimension set balance rebuilds</title><link>http://blogs.msdn.com/b/ax_gfm_framework_team_blog/archive/2012/11/09/batch-processing-for-dimension-set-balance-rebuilds.aspx</link><pubDate>Fri, 09 Nov 2012 18:56:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10367304</guid><dc:creator>Eric Pegors - Microsoft</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/ax_gfm_framework_team_blog/rsscomments.aspx?WeblogPostID=10367304</wfw:commentRss><comments>http://blogs.msdn.com/b/ax_gfm_framework_team_blog/archive/2012/11/09/batch-processing-for-dimension-set-balance-rebuilds.aspx#comments</comments><description>&lt;p&gt;When performing dimension set balance rebuilds in a batch, be sure to schedule the batches far enough apart that they do not run concurrently. Doing this will eliminate any chance for contention since a rebuild has to process the entire general journal.&lt;/p&gt;
&lt;p&gt;Dimension set balance updates are optimized to run efficiently even if they run concurrently,&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10367304" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/b/ax_gfm_framework_team_blog/archive/tags/Dynamics+AX/">Dynamics AX</category><category domain="http://blogs.msdn.com/b/ax_gfm_framework_team_blog/archive/tags/GFM/">GFM</category></item><item><title>Integrating a Source Document with Budget Control</title><link>http://blogs.msdn.com/b/ax_gfm_framework_team_blog/archive/2012/07/17/integrating-a-source-document-with-budget-control.aspx</link><pubDate>Tue, 17 Jul 2012 19:56:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10330799</guid><dc:creator>Kim Kroetsch</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/ax_gfm_framework_team_blog/rsscomments.aspx?WeblogPostID=10330799</wfw:commentRss><comments>http://blogs.msdn.com/b/ax_gfm_framework_team_blog/archive/2012/07/17/integrating-a-source-document-with-budget-control.aspx#comments</comments><description>&lt;p&gt;When adding a document extending the source document framework, the document can also be enabled for ledger budget checking.&amp;nbsp; This provides the ability for the financial activity of the document to be checked to ensure funds are available to pay for those activities.&amp;nbsp; Budget control is already integrated with the source document framework.&amp;nbsp; This integration ensures the budget funds available check occurs at the expected times in the document's life cycle and that all of the data prerequisites for budget checking are completed.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;After you have a document extending the source document framework follow these steps to enable that document to be checked for budget:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Add a new value for the integrating document to the BudgetControlSourceIntegrator enumeration
&lt;ul&gt;
&lt;li&gt;Each value in this enumeration corresponds to a document that can be enabled for budget control from the budget control configuration form.&amp;nbsp; Adding this value to the enumeration ensures that budget control data corresponding to the integrator is handled properly during budget control configuration maintenance.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Implement the SourceDocumentTypeIBudgetControl interface
&lt;ul&gt;
&lt;li&gt;The SourceDocumentType subclass for the integrator must implement the SourceDocumentTypeIBudgetControl interface.&amp;nbsp; This interface provides the following data:&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;ul&gt;
&lt;ul&gt;
&lt;ul&gt;
&lt;ul&gt;
&lt;li&gt;Budget control source integrator value: This maps the document's implementation to its setup in budget control configuration.&lt;/li&gt;
&lt;/ul&gt;
&lt;/ul&gt;
&lt;/ul&gt;
&lt;/ul&gt;
&lt;ul&gt;
&lt;ul&gt;
&lt;ul&gt;
&lt;ul&gt;
&lt;li&gt;Budget control category value:&amp;nbsp; This determines how the amounts of the document are included in the calculation of budget funds available.&lt;/li&gt;
&lt;/ul&gt;
&lt;/ul&gt;
&lt;/ul&gt;
&lt;/ul&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Extend the BudgetControlSourceDocumentLinePolicy class
&lt;ul&gt;
&lt;li&gt;The BudgetControlSourceDocumentLinePolicy class provides default budget control policy for a source document line.&amp;nbsp; The default policy can be extended.&amp;nbsp; The extension must be decorated with the SourceDocumentExtensionAttribute based on the BusinessEvent enum and value.&amp;nbsp; See the PurchOrderLineBudgetControlPolicy and VendorInvoiceLineBudgetControlPolicy classes for some examples of extending the behavior to add additional conditions for determining when budget funds available can be checked.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Extend the BudgetControlSourceDocumentLineRule class
&lt;ul&gt;
&lt;li&gt;The BudgetControlSourceDocumentLineRule class provides default budget control processing rules for a source document line.&amp;nbsp; The default rule can be extended.&amp;nbsp; Similar to the policy extension, the rule extension must be decorated with the SourceDocumentExtensionAttribute based on the BusinessEvent enum and value.&amp;nbsp; See the PurchOrderLineBudgetControlRule and VendorInvoiceLineBudgetControlRule classes for some examples of extending the behavior of the base rule in determining how the budget funds available check is performed against the document.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Add new data source edit methods on BudgetControlConfiguration data source on the BudgetControlConfiguration form to allow for budget checking to be enabled and disabled at the document level
&lt;ul&gt;
&lt;li&gt;Add a method calling the setSourceIntegratorEnabled() method.&amp;nbsp; This method will provide the option to enable and disable budget checking for the source document.&amp;nbsp; Then to refresh the form display when the value changes, call the setEnabledSourceDocuments() method.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Example: editVendorInvoiceEnabled()&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: courier new,courier;"&gt;&lt;b&gt;public&lt;/b&gt; &lt;b&gt;edit&lt;/b&gt; NoYes editVendorInvoiceEnabled(&lt;b&gt;boolean&lt;/b&gt; _set, NoYes _isEnabled)&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: courier new,courier;"&gt;{&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; BudgetControlSourceIntegrator sourceIntegrator = BudgetControlSourceIntegrator::VendorInvoice;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;b&gt;boolean&lt;/b&gt; isSet;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;b&gt;if&lt;/b&gt; (_set)&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;i&gt;// Set whether vendor invoice budget control is enabled.&lt;/i&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; isSet = this.setSourceIntegratorEnabled(sourceIntegrator, _isEnabled);&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;b&gt;if&lt;/b&gt; (isSet)&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; element.setEnabledSourceDocuments();&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;b&gt;return&lt;/b&gt; enabledSourceIntegrators.in(sourceIntegrator);&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: courier new,courier;"&gt;}&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Add a method calling the setSourceIntegratorDoBudgetCheckOnEntry() method.&amp;nbsp; This method will provide the option to specify whether the source document will perform a budget check at line item entry.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Example: editVendorInvoiceDoCheckOnEntry()&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: courier new,courier;"&gt;&lt;b&gt;public&lt;/b&gt; &lt;b&gt;edit&lt;/b&gt; NoYes editVendorInvoiceDoCheckOnEntry(&lt;b&gt;boolean&lt;/b&gt; _set, NoYes _doBudgetCheckOnEntry)&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: courier new,courier;"&gt;{&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; BudgetControlSourceIntegrator sourceIntegrator = BudgetControlSourceIntegrator::VendorInvoice;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;b&gt;if&lt;/b&gt; (_set)&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;i&gt;// Set whether vendor invoice do budget check on entry.&lt;/i&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; this.setSourceIntegratorDoBudgetCheckOnEntry(sourceIntegrator, _doBudgetCheckOnEntry);&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;b&gt;return&lt;/b&gt; doBudgetCheckOnEntrySourceIntegrators.in(sourceIntegrator);&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: courier new,courier;"&gt;}&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Add controls to the form on the SourceDocuments tab page to expose the edit methods that were added.&lt;/li&gt;
&lt;li&gt;Add code to maintain the form controls in the setEnabledSourceDocuments() and setVisibleSourceDocuments() methods.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;These additional extension areas can be considered depending on the requirements of the new source document:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Add extension attributes to enable budget checks when the accounting distribution form is interacted with from the source document.&amp;nbsp; This allows the budget funds available check to also occur after interacting with the accounting distributions form.
&lt;ul&gt;
&lt;li&gt;Add the SourceDocumentExtensionAttribute based on the SourceDocument enum and value to the BudgetControlAccDistFormViewExtension and BudgetControlAccDistViewModelExtension classes.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Add calls for on-demand checks
&lt;ul&gt;
&lt;li&gt;Budget checking is performed for a source document enabled for budget control through budget control configuration when the document is transitioned to a Completed state.&amp;nbsp; In addition to this state transition, budget checking is performed based on the option in the budget control configuration to do the budget check on line entry.&amp;nbsp; Additional calls can be added to perform a budget check at other times by calling one of the submitOnDemand() methods on the SourceDocumentProcessorFacade class.&amp;nbsp; Using this method will ignore the setting of the configuration option to perform the check on line entry.&amp;nbsp; Examples of when this can be used are workflow actions that should perform a budget check or a user-initiated action such as the "Perform budget check" action on the action pane.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10330799" width="1" height="1"&gt;</description></item><item><title>Step 6: Implement confirmation/posting of your document</title><link>http://blogs.msdn.com/b/ax_gfm_framework_team_blog/archive/2012/05/10/step-6-implement-confirmation-posting-of-your-document.aspx</link><pubDate>Fri, 11 May 2012 02:17:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10304071</guid><dc:creator>Jarek Wyganowski</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/ax_gfm_framework_team_blog/rsscomments.aspx?WeblogPostID=10304071</wfw:commentRss><comments>http://blogs.msdn.com/b/ax_gfm_framework_team_blog/archive/2012/05/10/step-6-implement-confirmation-posting-of-your-document.aspx#comments</comments><description>&lt;p&gt;&lt;span style="font-size: medium;" size="3"&gt;&lt;span style="font-family: Calibri;" face="Calibri"&gt;Posting of your document usually consist of creating accounting entries in ledger and updating your document to posted state. Source Document Framework will help you create accounting.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: medium;"&gt;&lt;span style="font-family: Calibri;" size="3" face="Calibri"&gt;a)&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span size="3"&gt;&lt;span style="font-family: Calibri;" face="Calibri"&gt;Add code necessary to perform state update of your document during posting (for instance, you can add a field IsPosted to your document header and set it to Yes when the document is posted successfully) . This&amp;nbsp;functionality will usually reside on a posting class specific to your document.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: medium;"&gt;&lt;span style="font-family: Calibri;" size="3" face="Calibri"&gt;b)&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span size="3"&gt;&lt;span style="font-family: Calibri;" face="Calibri"&gt;Wire your posting class to a &amp;ldquo;Post&amp;rdquo; button on your form through a menu item.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: medium;"&gt;&lt;span style="font-family: Calibri;" size="3" face="Calibri"&gt;c)&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span size="3"&gt;&lt;span style="font-family: Calibri;" face="Calibri"&gt;Make sure the source document implements parmCurrentVoucher() - this is used when generating accounting during document confirmation/posting.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: medium;"&gt;&lt;span style="font-family: Calibri;" size="3" face="Calibri"&gt;d)&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span size="3"&gt;&lt;span style="font-family: Calibri;" face="Calibri"&gt;Inside your confirmation/posting code, submit your document to the Source Document Framework calling:&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: courier new,courier; font-size: small;"&gt;SourceDocumentProcessorFacade::submitSourceDocumentImplementation(myDocumentHeader, &lt;b&gt;true&lt;/b&gt;, SourceDocumentAccountingStatus::Completed);&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: Calibri; font-size: medium;" size="3" face="Calibri"&gt;&amp;nbsp;&lt;/span&gt;&lt;span style="font-size: medium;" size="3"&gt;&lt;span style="font-family: Calibri;" face="Calibri"&gt;The code above will generate accounting.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: Calibri; font-size: medium;" size="3" face="Calibri"&gt;&amp;nbsp;&lt;/span&gt;&lt;span style="font-size: medium;"&gt;&lt;span style="font-family: Calibri;" size="3" face="Calibri"&gt;e)&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span size="3"&gt;&lt;span style="font-family: Calibri;" face="Calibri"&gt;To validate the accounting, on your document form action pane you can add a &amp;ldquo;Voucher&amp;rdquo; button to view the voucher for your posted document.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;span style="font-size: medium;"&gt;&lt;span size="3"&gt;&lt;span style="font-family: Calibri;" face="Calibri"&gt;The button should use LedgerTransVoucher display menu item.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-size: medium;"&gt;&lt;span size="3"&gt;&lt;span style="font-family: Calibri;" face="Calibri"&gt;The LedgerTransVoucher form needs to be modified to limit the vouchers to only those that are related to your document. Follow the pattern used for PurchTable: see form method named updateQueryForPurchTable() for an example of how to apply ranges on that form &amp;ndash; your code should be very similar to code in that method. Name your new method updateQueryForMyDocument().&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;span style="font-size: medium;"&gt;&lt;span size="3"&gt;&lt;span style="font-family: Calibri;" face="Calibri"&gt;Apply your range during initialization of the form calling updateQueryForMyDocument() from the form init() method - you will find examples of that examining existing code in the LedgerTransVoucher form init() method.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: medium;"&gt;&lt;span size="3"&gt;&lt;span style="font-family: Calibri;" face="Calibri"&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10304071" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/b/ax_gfm_framework_team_blog/archive/tags/Dynamics+AX/">Dynamics AX</category><category domain="http://blogs.msdn.com/b/ax_gfm_framework_team_blog/archive/tags/GFM/">GFM</category><category domain="http://blogs.msdn.com/b/ax_gfm_framework_team_blog/archive/tags/Source+Document+Framework/">Source Document Framework</category></item><item><title>Step 5: Add code to distribute and journalize source document amounts</title><link>http://blogs.msdn.com/b/ax_gfm_framework_team_blog/archive/2012/05/07/step-5-add-code-to-distribute-and-journalize-source-document-amounts.aspx</link><pubDate>Mon, 07 May 2012 23:36:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10302012</guid><dc:creator>Jarek Wyganowski</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/ax_gfm_framework_team_blog/rsscomments.aspx?WeblogPostID=10302012</wfw:commentRss><comments>http://blogs.msdn.com/b/ax_gfm_framework_team_blog/archive/2012/05/07/step-5-add-code-to-distribute-and-journalize-source-document-amounts.aspx#comments</comments><description>&lt;p&gt;&lt;span style="font-size: medium;" size="3"&gt;&lt;span style="font-family: Calibri;" face="Calibri"&gt;There might be a need to create new monetary amounts but that is optional and you may find existing monetary amounts sufficient. It depends if existing monetary amounts are a good fit for your document and have appropriate names to display on accounting distributions form. Either new or existing MonetaryAmount enum values will be used in your code creating distributions.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: medium;"&gt;&lt;span style="font-family: Calibri;" size="3" face="Calibri"&gt;a)&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span size="3"&gt;&lt;span style="font-family: Calibri;" face="Calibri"&gt;Create a class extending AccountingPolicy. Using &lt;/span&gt;&lt;/span&gt;&lt;span size="3"&gt;&lt;span style="font-family: Calibri;" face="Calibri"&gt;framework naming standards name this class AccPolicyMyBusinessEvent . &lt;br /&gt;Decorate it with &lt;/span&gt;&lt;/span&gt;&lt;span size="3"&gt;&lt;span style="font-family: Calibri;" face="Calibri"&gt;SourceDocumentExtensionAttribute:&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: courier new,courier; font-size: small;"&gt;[SourceDocumentExtensionAttribute(&lt;b&gt;enumNum&lt;/b&gt;(BusinessEvent_MyDocument), BusinessEvent_MyDocument::MyBusinessEvent)]&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: medium;"&gt;&lt;span style="font-family: Calibri;" size="3" face="Calibri"&gt;b)&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span size="3"&gt;&lt;span style="font-family: Calibri;" face="Calibri"&gt;(Optional) Add an additional value (MyValue) to MonetaryAmount enum. This will be used later to identify your specific amount when you add code to calculate all amounts that need to be distributed for your document in calculateSourceDocumentAmountMap method on your source document line classes.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: medium;"&gt;&lt;span style="font-family: Calibri;" size="3" face="Calibri"&gt;c)&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span size="3"&gt;&lt;span style="font-family: Calibri;" face="Calibri"&gt;(Optional) In case you added your value to MonetaryAmount enum &amp;ndash; update SourceDocumentMonetaryAmountModel class. Methods initMonetaryAmountChildMap() and optionally initMonetaryAmountParentMap() will need to be updated.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: medium;"&gt;&lt;span style="font-family: Calibri;" size="3" face="Calibri"&gt;d)&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span size="3"&gt;&lt;span style="font-family: Calibri;" face="Calibri"&gt;(Optional) In case you added your value to MonetaryAmount enum &amp;ndash; you may need to update SourceDocumentAmountFormTreeBuildHelper.initMonetaryAmountTreePostionMap() if you have specific requirements about sequencing of monetary amounts in the accounting distribution form. &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: medium;"&gt;&lt;span style="font-family: Calibri;" size="3" face="Calibri"&gt;e)&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span size="3"&gt;&lt;span style="font-family: Calibri;" face="Calibri"&gt;Create a class extending AccountingDistributionRule. Using framework naming standards name this class AccDistRuleMyDesiredAction where &amp;ldquo;MyDesiredAction&amp;rdquo; describes the business event associated with the rule (e.g. AccDistRuleSaleOfProductTax). Decorate it with SourceDocumentExtensionAttribute:&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: courier new,courier; font-size: small;"&gt;[SourceDocumentExtensionAttribute(&lt;b&gt;enumNum&lt;/b&gt;(BusinessEvent_MyDocument), BusinessEvent_ MyDocument::MyBusinessEvent, MonetaryAmount::MyValue)]&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: medium;" size="3"&gt;&lt;span style="font-family: Calibri;" face="Calibri"&gt;MyValue could be either an existing value or a newly created value (see optional steps 5 b-d).&lt;br /&gt;Implement abstract methods parmSide() and parmLedgerPostingType().&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: medium;"&gt;&lt;span style="font-family: Calibri;" size="3" face="Calibri"&gt;f)&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span size="3"&gt;&lt;span style="font-family: Calibri;" face="Calibri"&gt;Revisit your classes extending SourceDocumentLine which have monetary amounts to distribute. On each of them override method calculateSourceDocumentAmountMap() to return map of all source document amounts which need to be distributed.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: medium;"&gt;&lt;span style="font-family: Calibri;" size="3" face="Calibri"&gt;g)&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span size="3"&gt;&lt;span style="font-family: Calibri;" face="Calibri"&gt;(Optional) Create your own account dimension list provider. To do that, you need to first add a value to MainAccountDimensionListProviderType enum identifying the provider (let&amp;rsquo;s call it MyType). Next create a class that extends MainAccountDimensionListProvider. Decorate the class with SourceDocumentExtensionAttribute:&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: courier new,courier; font-size: small;"&gt;[SourceDocumentExtensionAttribute(&lt;b&gt;enumNum&lt;/b&gt;(MainAccountDimensionListProviderType), MainAccountDimensionListProviderType::MyType)]&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: medium;"&gt;&lt;span style="font-family: Calibri;" size="3" face="Calibri"&gt;h)&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span size="3"&gt;&lt;span style="font-family: Calibri;" face="Calibri"&gt;(Optional) Create an interface to abstract out usage of your provider and get required data for SourceDocumentLineItem classes that will implement this interface. Name it after the new enum value: SourceDocumentIMyType.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: medium;"&gt;&lt;span style="font-family: Calibri;" size="3" face="Calibri"&gt;i)&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span size="3"&gt;&lt;span style="font-family: Calibri;" face="Calibri"&gt;(Optional) Revisit your source document class (MyDocumentSourceDocument) and implement the SourceDocumentIMyType interface on it.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: medium;"&gt;&lt;span style="font-family: Calibri;" size="3" face="Calibri"&gt;j)&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span size="3"&gt;&lt;span style="font-family: Calibri;" face="Calibri"&gt;(Optional) Create provider class inheriting from MainAccountDimensionListProvider. Using framework naming standards name it MyTypeMainAccountDimensionListProvider. Decorate it with SourceDocumentExtensionAttribute:&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: courier new,courier; font-size: small;"&gt;[SourceDocumentExtensionAttribute(&lt;b&gt;enumNum&lt;/b&gt;(MainAccountDimensionListProviderType), MainAccountDimensionListProviderType::MyType)]&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: medium;" size="3"&gt;&lt;span style="font-family: Calibri;" face="Calibri"&gt;Implement populateMainAccountDimensionList() method to return the list containing the appropriate main account.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: medium;"&gt;&lt;span style="font-family: Calibri;" size="3" face="Calibri"&gt;k)&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span size="3"&gt;&lt;span style="font-family: Calibri;" face="Calibri"&gt;(Optional) Modify AccountingRule class adding method canUseMyTypeMainAccountDimensionListProvider() which determines under which conditions your provider should be used. It will usually be determined by source document extension class implementing correct interface, but could be other condition as well:&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: courier new,courier; font-size: small;"&gt;&lt;b&gt;public&lt;/b&gt; &lt;b&gt;boolean&lt;/b&gt; canUseMyTypeMainAccDimListProvider()&lt;br /&gt;{&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Object&amp;nbsp; sourceDocument = sourceDocumentLineItem.parmSourceDocument();&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;b&gt;return&lt;/b&gt; (sourceDocument &lt;b&gt;is&lt;/b&gt; SourceDocumentIMyType);&lt;br /&gt;}&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: medium;"&gt;&lt;span style="font-family: Calibri;" size="3" face="Calibri"&gt;l)&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span size="3"&gt;&lt;span style="font-family: Calibri;" face="Calibri"&gt;(Optional) Modify MainAccountDerivationDistributionRule and/or MainAccountDerivationJournalizingRule to initialize the account list based on new provider. Code will be added in populateMainAccountList() method.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: medium;" size="3"&gt;&lt;span style="font-family: Calibri;" face="Calibri"&gt;The distributions part should be working now and you should be able to see distributions on your document&amp;rsquo;s form clicking on distributions buttons which you added earlier.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: medium;" size="3"&gt;&lt;span style="font-family: Calibri;" face="Calibri"&gt;Now you need to add necessary code for proper journalization of your document. &lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: medium;" size="3"&gt;&lt;span style="font-family: Calibri;" face="Calibri"&gt;Usually you will just want to put the balancing amount into certain account (like Vendor Balance). If you need just that, do the following:&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: medium;" size="3"&gt;&lt;span style="font-family: Calibri;" face="Calibri"&gt;&lt;/span&gt;&lt;/span&gt;&amp;nbsp;&lt;span style="font-size: medium;"&gt;&lt;span style="font-family: Calibri;" size="3" face="Calibri"&gt;m)&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span size="3"&gt;&lt;span style="font-family: Calibri;" face="Calibri"&gt;Create a class extending AccountingJournalizingRule. Using framework naming standards name this class AccJourRuleMyDesiredAction where &amp;ldquo;MyDesiredAction&amp;rdquo; describes the action you are performing which affects your distributions (e.g. AccJourRuleSaleRevenue). Decorate it with SourceDocumentExtensionAttribute:&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: courier new,courier; font-size: small;"&gt;[SourceDocumentExtensionAttribute(&lt;b&gt;enumNum&lt;/b&gt;(BusinessEvent_MyDocument), BusinessEvent_ MyDocument::MyBusinessEvent, MonetaryAmount::MyValue)]&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: medium;" size="3"&gt;&lt;span style="font-family: Calibri;" face="Calibri"&gt;MyValue could be either newly created value or an existing one. &lt;br /&gt;Implement abstract methods parmSide() and parmLedgerPostingType().&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: medium;"&gt;&lt;span style="font-family: Calibri;" size="3" face="Calibri"&gt;n)&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span size="3"&gt;&lt;span style="font-family: Calibri;" face="Calibri"&gt;Go back to your source document class and inherit the right source document interface on it (for example SourceDocumentIParty for vendor balance) - it will tell the MainAccountDerivationJournalizingRule class (through canUse&amp;lt;ProviderType&amp;gt; method) to use the specific DimensionListProvider during journalization (see code inside MainAccountDerivationJournalizingRule.populateMainAccountList() for more info).&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: medium;" size="3"&gt;&lt;span style="font-family: Calibri;" face="Calibri"&gt;&lt;/span&gt;&lt;/span&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: medium;" size="3"&gt;&lt;span style="font-family: Calibri;" face="Calibri"&gt;Rarely, your document will have more demanding journalization requirements than just putting a balance amount into a balance account. If that is the case you may need to implement journalization rules with steps analogous to implementing distribution generation described above.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: medium;" size="3"&gt;&lt;span style="font-family: Calibri;" face="Calibri"&gt;After this step the button which you added earlier on your document&amp;rsquo;s form which invokes menu item SubledgerJournalAccountEntries should display all subledger account entries for your document allowing you to test distribution and journalization rules.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: medium;" size="3"&gt;&lt;span style="font-family: Calibri;" face="Calibri"&gt;&lt;/span&gt;&lt;/span&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: medium;" size="3"&gt;&lt;span style="font-family: Calibri;" face="Calibri"&gt;Next - &lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: medium;" size="3"&gt;&lt;span style="font-family: Calibri;" face="Calibri"&gt;&lt;a href="http://blogs.msdn.com/b/ax_gfm_framework_team_blog/archive/2012/05/10/step-6-implement-confirmation-posting-of-your-document.aspx"&gt;&lt;strong&gt;Step 6:&lt;/strong&gt; Implement confirmation/posting of your document&lt;/a&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10302012" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/b/ax_gfm_framework_team_blog/archive/tags/Dynamics+AX/">Dynamics AX</category><category domain="http://blogs.msdn.com/b/ax_gfm_framework_team_blog/archive/tags/GFM/">GFM</category><category domain="http://blogs.msdn.com/b/ax_gfm_framework_team_blog/archive/tags/Source+Document+Framework/">Source Document Framework</category></item><item><title>Step 4: Add Source Document Framework forms to your document UI</title><link>http://blogs.msdn.com/b/ax_gfm_framework_team_blog/archive/2012/05/03/step-4-add-source-document-framework-forms-to-your-document-ui.aspx</link><pubDate>Thu, 03 May 2012 17:11:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10300508</guid><dc:creator>Jarek Wyganowski</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/ax_gfm_framework_team_blog/rsscomments.aspx?WeblogPostID=10300508</wfw:commentRss><comments>http://blogs.msdn.com/b/ax_gfm_framework_team_blog/archive/2012/05/03/step-4-add-source-document-framework-forms-to-your-document-ui.aspx#comments</comments><description>&lt;p&gt;&lt;span style="font-size: medium;" size="3"&gt;&lt;span style="font-family: Calibri;" face="Calibri"&gt;This initial wiring will just display empty windows as you didn&amp;rsquo;t create code which would calculate distributions. But it is good to do it now to be able to have a quick visual test when you later add code related to distributions.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: medium;"&gt;&lt;span style="font-family: Calibri;" size="3" face="Calibri"&gt;a)&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span size="3"&gt;&lt;span style="font-family: Calibri;" face="Calibri"&gt;Make sure you supplied both Label and SingularLabel for your document header and line tables (see table properties) as those are used by the distributions form.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: medium;"&gt;&lt;span style="font-family: Calibri;" size="3" face="Calibri"&gt;b)&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span size="3"&gt;&lt;span style="font-family: Calibri;" face="Calibri"&gt;On your document form action pane add a button to view distributions for your document. The display menu item which opens the AccountingDistributions form for this purpose is AccountingDistributionsDocumentView.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: medium;"&gt;&lt;span style="font-family: Calibri;" size="3" face="Calibri"&gt;c)&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span size="3"&gt;&lt;span style="font-family: Calibri;" face="Calibri"&gt;On your document form action pane add a button to edit distributions for your document. The display menu item which opens the AccountingDistributions form for this purpose is AccountingDistributions.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: medium;"&gt;&lt;span style="font-family: Calibri;" size="3" face="Calibri"&gt;d)&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span size="3"&gt;&lt;span style="font-family: Calibri;" face="Calibri"&gt;On your document form action pane add a button to view subledger journal entries for your document. The display menu item for that purpose is SubledgerJournalAccountEntries.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: medium;"&gt;&lt;span style="font-family: Calibri;" size="3" face="Calibri"&gt;e)&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span size="3"&gt;&lt;span style="font-family: Calibri;" face="Calibri"&gt;On your document form line action pane add a button to edit distributions for your source document line. The display menu item which opens the AccountingDistributions form for this purpose is AccountingDistributions.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: medium;"&gt;&lt;span style="font-family: Calibri;" size="3" face="Calibri"&gt;f)&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span size="3"&gt;&lt;span style="font-family: Calibri;" face="Calibri"&gt;For all menu items you need to setup security properly for roles that need access to your document. Along with that you may decide to create your own menu items instead of reusing existing menu items, pointing the new menu items to the same forms as mentioned above and customizing both menu items and security based on those menu items to your needs.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: medium;"&gt;&lt;span style="font-family: Calibri;" size="3" face="Calibri"&gt; Below is an example of UI wiring to Source Document Framework taken from Vendor Invoice entry form (VendEditInvoice):&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-50-86/3108.InvoiceDist.png"&gt;&lt;img border="0" alt="" src="http://blogs.msdn.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-50-86/3108.InvoiceDist.png" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: medium;" size="3"&gt;&lt;span style="font-family: Calibri;" face="Calibri"&gt;Next - &lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: medium;" size="3"&gt;&lt;span style="font-family: Calibri;" face="Calibri"&gt;&lt;a href="http://blogs.msdn.com/b/ax_gfm_framework_team_blog/archive/2012/05/07/step-5-add-code-to-distribute-and-journalize-source-document-amounts.aspx"&gt;&lt;strong&gt;Step 5:&lt;/strong&gt; Add code to distribute and journalize source document amounts&lt;/a&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10300508" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/b/ax_gfm_framework_team_blog/archive/tags/Dynamics+AX/">Dynamics AX</category><category domain="http://blogs.msdn.com/b/ax_gfm_framework_team_blog/archive/tags/GFM/">GFM</category><category domain="http://blogs.msdn.com/b/ax_gfm_framework_team_blog/archive/tags/Source+Document+Framework/">Source Document Framework</category></item><item><title>Step 3: Perform initial wiring to Source Document Framework – document classes</title><link>http://blogs.msdn.com/b/ax_gfm_framework_team_blog/archive/2012/05/01/step-3-perform-initial-wiring-to-source-document-framework-document-classes.aspx</link><pubDate>Tue, 01 May 2012 13:42:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10299491</guid><dc:creator>Jarek Wyganowski</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/ax_gfm_framework_team_blog/rsscomments.aspx?WeblogPostID=10299491</wfw:commentRss><comments>http://blogs.msdn.com/b/ax_gfm_framework_team_blog/archive/2012/05/01/step-3-perform-initial-wiring-to-source-document-framework-document-classes.aspx#comments</comments><description>&lt;p&gt;&lt;span style="font-size: medium;" size="3"&gt;&lt;span style="font-family: Calibri;" face="Calibri"&gt;Now you need to implement few classes representing your source document.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: medium;"&gt;&lt;span style="font-family: Calibri;" size="3" face="Calibri"&gt;a)&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="font-family: Calibri;" face="Calibri"&gt;&lt;span size="3"&gt;Create a class which extends SourceDocumentType. &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;span style="font-size: medium;"&gt;&lt;span style="font-family: Calibri;" face="Calibri"&gt;&lt;span size="3"&gt;Using framework naming standards name this class MyDocumentSourceDocumentType.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-size: medium;"&gt;&lt;span size="3"&gt;&lt;span style="font-family: Calibri;" face="Calibri"&gt;Implement all abstract methods (see examples in the following existing classes: CustInvoiceSourceDocType, VendorInvoiceSourceDocType, PurchaseOrderSourceDocumentType)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p style="padding-left: 60px;"&gt;&lt;span style="font-size: medium;"&gt;&lt;span style="font-family: Calibri;" size="3" face="Calibri"&gt;-&lt;/span&gt;&amp;nbsp;&lt;span size="3"&gt;&lt;span style="font-family: Calibri;" face="Calibri"&gt;parmModule(): used to determine whether it is valid to add entries to subledger for given module.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="padding-left: 60px;"&gt;&lt;span style="font-size: medium;"&gt;&lt;span style="font-family: Calibri;" size="3" face="Calibri"&gt;-&lt;/span&gt;&amp;nbsp;&lt;span size="3"&gt;&lt;span style="font-family: Calibri;" face="Calibri"&gt;parmSourceDocumentHeaderRootNodeLabel(), parmSourceDocumentLineRootNodeLabel() : used by UI to display proper label for document header or lines respectively.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="padding-left: 60px;"&gt;&lt;span style="font-size: medium;"&gt;&lt;span style="font-family: Calibri;" size="3" face="Calibri"&gt;-&lt;/span&gt;&amp;nbsp;&lt;span size="3"&gt;&lt;span style="font-family: Calibri;" face="Calibri"&gt;parmSubledgerJournalEntryType(): amounts (including matching amounts) are balanced by the framework across subledger journal entry types. &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="padding-left: 60px;"&gt;&lt;span style="font-size: medium;"&gt;&lt;span style="font-family: Calibri;" size="3" face="Calibri"&gt;-&lt;/span&gt;&amp;nbsp;&lt;span style="font-family: Calibri;" face="Calibri"&gt;&lt;span size="3"&gt;parmSubledgerJournalRelievingMethod(): in case of matching it specifies relieving method for amounts of the upstream document.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;span style="font-size: medium;"&gt;&lt;span size="3"&gt;&lt;span style="font-family: Calibri;" face="Calibri"&gt;Decorate the class with SourceDocumentExtensionAttribute(s) with appropriate parameters from the newly created enums. &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;span style="font-family: Calibri; font-size: medium;" size="3" face="Calibri"&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p style="padding-left: 30px;"&gt;&lt;span style="font-family: courier new,courier; font-size: small;"&gt;[SourceDocumentExtensionAttribute(&lt;b&gt;enumNum&lt;/b&gt;(SourceDocument_MyDocument), SourceDocument_MyDocument::MyDocument)]&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: Calibri; font-size: medium;" size="3" face="Calibri"&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: medium;"&gt;&lt;span style="font-family: Calibri;" size="3" face="Calibri"&gt;b)&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="font-family: Calibri;" face="Calibri"&gt;&lt;span size="3"&gt;Create a class which extends SourceDocument. &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;span style="font-size: medium;"&gt;&lt;span style="font-family: Calibri;" face="Calibri"&gt;&lt;span size="3"&gt;Using framework naming standards name this class MyDocumentSourceDocument. &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-size: medium;"&gt;&lt;span style="font-family: Calibri;" face="Calibri"&gt;&lt;span size="3"&gt;Implement initializeImplementation() which is intended to set up internal state (for examples see VendorInvoiceSourceDoc.initializeImplementation(), PurchaseOrderSourceDocument.initializeImplementation())&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-size: medium;"&gt;&lt;span size="3"&gt;&lt;span style="font-family: Calibri;" face="Calibri"&gt;Decorate this class with SourceDocumentExtensionAttribute(s) with appropriate parameters from the newly created enums.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p style="padding-left: 30px;"&gt;&lt;br /&gt;&lt;span style="font-family: courier new,courier; font-size: small;"&gt;[SourceDocumentExtensionAttribute(&lt;b&gt;enumNum&lt;/b&gt;(SourceDocument_MyDocument), SourceDocument_MyDocument::MyDocument, &lt;b&gt;tableNum&lt;/b&gt;(MyDocumentHeader))]&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: Calibri; font-size: medium;" size="3" face="Calibri"&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;span style="font-size: medium;"&gt;&lt;span size="3"&gt;&lt;span style="font-family: Calibri;" face="Calibri"&gt;Create an enum for your business event. &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p style="padding-left: 60px;"&gt;&lt;span style="font-size: medium;"&gt;&lt;span style="font-family: Calibri;" size="3" face="Calibri"&gt;-&lt;/span&gt;&amp;nbsp;&lt;span size="3"&gt;&lt;span style="font-family: Calibri;" face="Calibri"&gt;Using framework naming standards name it BusinessEvent_MyDocument.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="padding-left: 60px;"&gt;&lt;span style="font-size: medium;"&gt;&lt;span style="font-family: Calibri;" size="3" face="Calibri"&gt;-&lt;/span&gt;&amp;nbsp;&lt;span size="3"&gt;&lt;span style="font-family: Calibri;" face="Calibri"&gt;Values would list all business event types specific to your document. Add values: None = 0, MyBusinessEvent = 1. &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="padding-left: 60px;"&gt;&lt;span style="font-size: medium;"&gt;&lt;span style="font-family: Calibri;" size="3" face="Calibri"&gt;-&lt;/span&gt;&amp;nbsp;&lt;span size="3"&gt;&lt;span style="font-family: Calibri;" face="Calibri"&gt;This will be used by attributes on extensions of AccountingDistributionRule, AccountingJournalizingRule and AccountingPolicy which you will create later.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: Calibri; font-size: medium;" size="3" face="Calibri"&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;span style="font-size: medium;"&gt;&lt;span size="3"&gt;&lt;span style="font-family: Calibri;" face="Calibri"&gt;Implement appropriate SourceDocument interfaces &amp;ndash; as a minimum SourceDocumentIDataProvider interface providing the following methods: &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p style="padding-left: 60px;"&gt;&lt;span style="font-size: medium;"&gt;&lt;span style="font-family: Calibri;" size="3" face="Calibri"&gt;-&lt;/span&gt;&amp;nbsp;&lt;span size="3"&gt;&lt;span style="font-family: Calibri;" face="Calibri"&gt;parmDistributionTemplateRecId(): should return a RecId reference of a template. If not empty, the template will be used to populate ledger dimension allocation list&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="padding-left: 60px;"&gt;&lt;span style="font-size: medium;"&gt;&lt;span style="font-family: Calibri;" size="3" face="Calibri"&gt;-&lt;/span&gt;&amp;nbsp;&lt;span size="3"&gt;&lt;span style="font-family: Calibri;" face="Calibri"&gt;documentsBusinessEvent(): should return the BusinessEvent based on your newly created BusinessEvent_MyDocument enum&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="padding-left: 60px;"&gt;&lt;span style="font-size: medium;"&gt;&lt;span style="font-family: Calibri;" size="3" face="Calibri"&gt;-&lt;/span&gt;&amp;nbsp;&lt;span size="3"&gt;&lt;span style="font-family: Calibri;" face="Calibri"&gt;parmAccountingDate(): should return the accounting date for the document&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="padding-left: 60px;"&gt;&lt;span style="font-size: medium;"&gt;&lt;span style="font-family: Calibri;" size="3" face="Calibri"&gt;-&lt;/span&gt;&amp;nbsp;&lt;span size="3"&gt;&lt;span style="font-family: Calibri;" face="Calibri"&gt;parmBusinessEventDate(): the simplest implementation is already provided on the SourceDocument class&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="padding-left: 60px;"&gt;&lt;span style="font-size: medium;"&gt;&lt;span style="font-family: Calibri;" size="3" face="Calibri"&gt;-&lt;/span&gt;&amp;nbsp;&lt;span size="3"&gt;&lt;span style="font-family: Calibri;" face="Calibri"&gt;parmDefaultDimension(): if default dimension is provided, it is used by the framework to build ledger dimension&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: medium;"&gt;&lt;span style="font-family: Calibri;" size="3" face="Calibri"&gt;c)&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span size="3"&gt;&lt;span style="font-family: Calibri;" face="Calibri"&gt;Create class(es) extending SourceDocumentLineItem. &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;span style="font-size: medium;" size="3"&gt;&lt;span style="font-family: Calibri;" face="Calibri"&gt;If your document has amounts to distribute on both header and lines you may need to create two such classes. &lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-size: medium;" size="3"&gt;&lt;span style="font-family: Calibri;" face="Calibri"&gt;Using framework naming standards name those classes MyDocumentLineSourceDocumentLineItem, MyDocumentSourceDocumentLineItem respectively. &lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-size: medium;" size="3"&gt;&lt;span style="font-family: Calibri;" face="Calibri"&gt;Implement the following abstract methods (for examples see the existing implementations: CustInvoiceSourceDocLineItem, CustInvoiceLineSourceDocLineItem, VendorInvoiceSourceDocLineItem, VendorInvoiceLineSourceDocLineItem, PurchOrderSourceDocumentLineItem, PurchOrderLineSourceDocumentLineItem)&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p style="padding-left: 60px;"&gt;&lt;span style="font-size: medium;"&gt;&lt;span style="font-family: Calibri;" size="3" face="Calibri"&gt;-&lt;/span&gt;&amp;nbsp;&lt;span size="3"&gt;&lt;span style="font-family: Calibri;" face="Calibri"&gt;calculateLegalEntityRecId(): should return reference to CompanyInfo table record representing legal entity of the document line&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="padding-left: 60px;"&gt;&lt;span style="font-size: medium;"&gt;&lt;span style="font-family: Calibri;" size="3" face="Calibri"&gt;-&lt;/span&gt;&amp;nbsp;&lt;span size="3"&gt;&lt;span style="font-family: Calibri;" face="Calibri"&gt;calculateSourceDocumentAmountMap(): should return object of type SourceDocumentAmountMap representing collection of amounts to distribute for the line&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="padding-left: 60px;"&gt;&lt;span style="font-size: medium;"&gt;&lt;span style="font-family: Calibri;" size="3" face="Calibri"&gt;-&lt;/span&gt;&amp;nbsp;&lt;span style="font-family: Calibri;" size="3" face="Calibri"&gt;documentsBusinessEvent(): should return a business event documented by given source document line. In the simplest form the code will look like the following:&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family: courier new,courier; font-size: small;"&gt;&lt;b&gt;return new&lt;/b&gt; BusinessEvent(&lt;b&gt;enumNum&lt;/b&gt;(BusinessEvent_MyDocument), BusinessEvent_MyDocument::MyBusinessEvent);&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p style="padding-left: 60px;"&gt;&lt;span style="font-size: medium;"&gt;&lt;span style="font-family: Calibri;" size="3" face="Calibri"&gt;-&lt;/span&gt;&amp;nbsp;&lt;span size="3"&gt;&lt;span style="font-family: Calibri;" face="Calibri"&gt;initializeImplementation() - intended to set up internal state&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="padding-left: 60px;"&gt;&lt;span style="font-size: medium;"&gt;&lt;span style="font-family: Calibri;" size="3" face="Calibri"&gt;-&lt;/span&gt;&amp;nbsp;&lt;span size="3"&gt;&lt;span style="font-family: Calibri;" face="Calibri"&gt;parmTransactionCurrencyCode() &amp;ndash; should return the currency for the line&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: Calibri; font-size: medium;" size="3" face="Calibri"&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;span style="font-size: medium;"&gt;&lt;span style="font-family: Calibri;" size="3" face="Calibri"&gt;Decorate each class with &lt;/span&gt;&lt;span style="font-family: Calibri;" size="3" face="Calibri"&gt;SourceDocumentExtensionAttribute(s) with appropriate parameters from the newly created enums.&lt;br /&gt;&lt;br /&gt;Attribute for line class:&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new,courier; font-size: small;"&gt;[SourceDocumentExtensionAttribute(&lt;b&gt;enumNum&lt;/b&gt;(SourceDocumentLine_MyDocument), SourceDocumentLine_MyDocument::MyDocumentLine)]&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: Calibri; font-size: medium;" size="3" face="Calibri"&gt;Attribute for totals line class:&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new,courier; font-size: small;"&gt;[SourceDocumentExtensionAttribute(&lt;b&gt;enumNum&lt;/b&gt;(SourceDocument_MyDocument), SourceDocumentLine_MyDocument::MyDocumentTotalsLine)]&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp;&lt;/p&gt;
&lt;p style="padding-left: 30px;"&gt;&lt;span style="font-size: medium;"&gt;&lt;span style="font-family: Calibri;" size="3" face="Calibri"&gt;d)&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span size="3"&gt;&lt;span style="font-family: Calibri;" face="Calibri"&gt;Keep document state persisted by the source document framework in sync with your document state. This is done by overwriting table insert() and update() methods on your document tables.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="padding-left: 60px;"&gt;&lt;span style="font-size: medium;"&gt;&lt;span style="font-family: Calibri;" size="3" face="Calibri"&gt;&lt;br /&gt;&lt;br /&gt;Document header &amp;ndash; insert()&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="padding-left: 60px;"&gt;&lt;span style="font-family: courier new,courier; font-size: small;"&gt;SourceDocumentProcessorFacade::submitSourceDocumentImplementation(this);&lt;/span&gt;&lt;/p&gt;
&lt;p style="padding-left: 60px;"&gt;&lt;span style="font-family: courier new,courier; font-size: small;"&gt;SourceDocumentProcessorFacade::submitSourceDocumentLineImplementation(this);&lt;/span&gt;&lt;/p&gt;
&lt;p style="padding-left: 60px;"&gt;&lt;span style="font-family: courier new,courier; font-size: small;"&gt;&lt;b&gt;super&lt;/b&gt;();&lt;/span&gt;&lt;/p&gt;
&lt;p style="padding-left: 60px;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="padding-left: 60px;"&gt;&amp;nbsp;&lt;br /&gt;&lt;span style="font-size: medium;"&gt;&lt;span style="font-family: Calibri;" size="3" face="Calibri"&gt;Document header &amp;ndash; update()&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family: courier new,courier; font-size: small;"&gt;&lt;b&gt;super&lt;/b&gt;();&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="padding-left: 60px;"&gt;&lt;span style="font-family: courier new,courier; font-size: small;"&gt;SourceDocumentProcessorFacade::submitSourceDocumentLinesForHeader(this, SourceDocumentLineAccountingStatus::FullyDistributed);&lt;/span&gt;&lt;/p&gt;
&lt;p style="padding-left: 30px;"&gt;&lt;span style="font-family: Calibri;" size="3" face="Calibri"&gt;&lt;/span&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="padding-left: 60px;"&gt;&lt;span style="font-size: small;" size="3"&gt;&lt;span style="font-family: Calibri;" face="Calibri"&gt;&lt;span style="font-size: medium;"&gt;Document line &amp;ndash; insert()&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="padding-left: 60px;"&gt;&lt;span style="font-family: courier new,courier; font-size: small;"&gt;SourceDocumentProcessorFacade::submitSourceDocumentLineImplementation(this);&lt;/span&gt;&lt;/p&gt;
&lt;p style="padding-left: 60px;"&gt;&lt;span style="font-family: courier new,courier; font-size: small;"&gt;&lt;b&gt;super&lt;/b&gt;();&lt;/span&gt;&lt;/p&gt;
&lt;p style="padding-left: 30px;"&gt;&lt;span style="font-family: Calibri;" size="3" face="Calibri"&gt;&lt;/span&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="padding-left: 60px;"&gt;&lt;span style="font-size: medium;" size="3"&gt;&lt;span style="font-family: Calibri;" face="Calibri"&gt;Document line &amp;ndash; update()&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="padding-left: 60px;"&gt;&lt;span style="font-family: courier new,courier; font-size: small;"&gt;&lt;b&gt;super&lt;/b&gt;();&lt;/span&gt;&lt;/p&gt;
&lt;p style="padding-left: 60px;"&gt;&lt;span style="font-family: courier new,courier; font-size: small;"&gt;SourceDocumentProcessorFacade::submitSourceDocumentLineImplementation(this);&lt;/span&gt;&lt;/p&gt;
&lt;p style="padding-left: 60px;"&gt;&lt;span style="font-family: courier new,courier; font-size: small;"&gt;&lt;/span&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: medium;" size="3"&gt;&lt;span style="font-family: Calibri;" face="Calibri"&gt;Next - &lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: medium;" size="3"&gt;&lt;span style="font-family: Calibri;" face="Calibri"&gt;&lt;a href="http://blogs.msdn.com/b/ax_gfm_framework_team_blog/archive/2012/05/03/step-4-add-source-document-framework-forms-to-your-document-ui.aspx"&gt;&lt;strong&gt;Step 4:&lt;/strong&gt; Add Source Document Framework forms to your document UI&lt;/a&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10299491" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/b/ax_gfm_framework_team_blog/archive/tags/Dynamics+AX/">Dynamics AX</category><category domain="http://blogs.msdn.com/b/ax_gfm_framework_team_blog/archive/tags/GFM/">GFM</category><category domain="http://blogs.msdn.com/b/ax_gfm_framework_team_blog/archive/tags/Source+Document+Framework/">Source Document Framework</category></item><item><title>Step 2: Perform initial wiring to Source Document Framework – tables and maps</title><link>http://blogs.msdn.com/b/ax_gfm_framework_team_blog/archive/2012/04/26/step-2-perform-initial-wiring-to-source-document-framework-tables-and-maps.aspx</link><pubDate>Thu, 26 Apr 2012 22:14:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10298240</guid><dc:creator>Jarek Wyganowski</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/ax_gfm_framework_team_blog/rsscomments.aspx?WeblogPostID=10298240</wfw:commentRss><comments>http://blogs.msdn.com/b/ax_gfm_framework_team_blog/archive/2012/04/26/step-2-perform-initial-wiring-to-source-document-framework-tables-and-maps.aspx#comments</comments><description>&lt;p&gt;&lt;span style="font-size: medium;" size="3"&gt;&lt;span style="font-family: Calibri;" face="Calibri"&gt;The Source Document Framework (Accounting Framework) will provide functionality necessary to record business events and create accounting for the newly created document &amp;ndash; accounting distributions and subledger journal entries. But you will need to inform the framework how to deal with your document. &lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: medium;"&gt;&lt;span style="font-family: Calibri;" size="3" face="Calibri"&gt;a)&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span size="3"&gt;&lt;span style="font-family: Calibri;" face="Calibri"&gt;Reference source document header&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;span style="font-size: medium;"&gt;&lt;span size="3"&gt;&lt;span style="font-family: Calibri;" face="Calibri"&gt;Modify the table definition of your document header table adding SourceDocumentHeader field of type SourceDocumentHeaderRecId. &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-size: medium;"&gt;&lt;span size="3"&gt;&lt;span style="font-family: Calibri;" face="Calibri"&gt;Add your header table to SourceDocumentHeaderImplementation map (under AOT/Data Dictionary/Maps/SourceDocumentHeaderImplementation/Mappings) &amp;ndash; adding a mapping to SourceDocumentHeader field from your header table. &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-size: medium;"&gt;&lt;span style="font-family: Calibri;" face="Calibri"&gt;&lt;span size="3"&gt;Create an enum following the naming convention SourceDocument_MyDocument. Add values None = 0, MyDocument = 1. This enum and its values will be used by SourceDocumentExtensionAttribute to bind your classes to the framework in later steps. &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-size: medium;"&gt;&lt;span size="3"&gt;&lt;span style="font-family: Calibri;" face="Calibri"&gt;Treat map as an interface: implement all methods from the map on the table &amp;ndash; namely:&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p style="padding-left: 60px;"&gt;&lt;span style="font-size: medium;"&gt;&lt;span style="font-family: Calibri;" size="3" face="Calibri"&gt;-&lt;/span&gt;&amp;nbsp;&lt;span size="3"&gt;&lt;span style="font-family: Calibri;" face="Calibri"&gt;parmSourceDocHeaderTypeEnumValue(): return appropriate value from the SourceDocument_MyDocument enum you created earlier&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="padding-left: 60px;"&gt;&lt;span style="font-size: medium;"&gt;&lt;span style="font-family: Calibri;" size="3" face="Calibri"&gt;-&lt;/span&gt;&amp;nbsp;&lt;span size="3"&gt;&lt;span style="font-family: Calibri;" face="Calibri"&gt;parmSourceDocHeaderTypeEnumName(): return the name of the SourceDocument_MyDocument enum you created earlier&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: medium;" size="3"&gt;&lt;span style="font-family: Calibri;" face="Calibri"&gt;See existing implementations on CustInvoiceTable, VendInvoiceInfoTable and PurchTable tables for examples related to Customer Invoice, Vendor Invoice and Purchase Order documents respectively.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: medium;"&gt;&lt;span style="font-family: Calibri;" size="3" face="Calibri"&gt;b)&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span size="3"&gt;&lt;span style="font-family: Calibri;" face="Calibri"&gt;Reference source document line&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;span style="font-size: medium;"&gt;&lt;span size="3"&gt;&lt;span style="font-family: Calibri;" face="Calibri"&gt;Modify the table definition of your document line table adding SourceDocumentLine field of type SourceDocumentLineRecId. &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-size: medium;"&gt;&lt;span style="font-family: Calibri;" size="3" face="Calibri"&gt;Add your line table to &lt;/span&gt;&lt;span style="font-family: Calibri;" size="3" face="Calibri"&gt;SourceDocumentLineImplementation &lt;/span&gt;&lt;span size="3"&gt;&lt;span style="font-family: Calibri;" face="Calibri"&gt;map (under AOT/Data Dictionary/Maps/SourceDocumentLineImplementation/Mappings) &amp;ndash; adding a mapping to SourceDocumentLine field from your line table. &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-size: medium;"&gt;&lt;span style="font-family: Calibri;" face="Calibri"&gt;&lt;span size="3"&gt;Create an enum following the naming convention SourceDocumentLine_MyDocument. Add values None = 0, MyDocumentLine = 1. This enum and its values will be used by SourceDocumentExtensionAttribute to tie your classes to the framework in later steps. &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-size: medium;"&gt;&lt;span size="3"&gt;&lt;span style="font-family: Calibri;" face="Calibri"&gt;Treat map as an interface: implement all methods from the map on the table &amp;ndash; is this step you will use new base enums created in prior step. The following methods need to be implemented: &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p style="padding-left: 60px;"&gt;&lt;span style="font-size: medium;"&gt;&lt;span style="font-family: Calibri;" size="3" face="Calibri"&gt;-&lt;/span&gt;&amp;nbsp;&lt;span size="3"&gt;&lt;span style="font-family: Calibri;" face="Calibri"&gt;parmSourceDocLineTypeEnumValue(): return appropriate value from the SourceDocumentLine_MyDocument&amp;nbsp; enum you created earlier&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="padding-left: 60px;"&gt;&lt;span style="font-size: medium;"&gt;&lt;span style="font-family: Calibri;" size="3" face="Calibri"&gt;-&lt;/span&gt;&amp;nbsp;&lt;span size="3"&gt;&lt;span style="font-family: Calibri;" face="Calibri"&gt;parmSourceDocLineTypeEnumName(): return the name of the SourceDocumentLine_MyDocument enum you created earlier&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="padding-left: 60px;"&gt;&lt;span style="font-size: medium;"&gt;&lt;span style="font-family: Calibri;" size="3" face="Calibri"&gt;-&lt;/span&gt;&amp;nbsp;&lt;span size="3"&gt;&lt;span style="font-family: Calibri;" face="Calibri"&gt;parmSourceDocumentHeader(): should return corresponding SourceDocumentHeader record&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="padding-left: 60px;"&gt;&lt;span style="font-size: medium;"&gt;&lt;span style="font-family: Calibri;" size="3" face="Calibri"&gt;-&lt;/span&gt;&amp;nbsp;&lt;span size="3"&gt;&lt;span style="font-family: Calibri;" face="Calibri"&gt;parmParentSourceDocumentLine(): should return source document line which is a parent for given source document line (for example &amp;ndash; tax line could return its parent invoice line)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="padding-left: 60px;"&gt;&lt;span style="font-size: medium;"&gt;&lt;span style="font-family: Calibri;" size="3" face="Calibri"&gt;-&lt;/span&gt;&amp;nbsp;&lt;span size="3"&gt;&lt;span style="font-family: Calibri;" face="Calibri"&gt;parmExchangeRateDate(): should return date of the exchange rate for given line&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: Calibri; font-size: medium;" size="3" face="Calibri"&gt;&amp;nbsp;&lt;/span&gt;&lt;span style="font-size: medium;" size="3"&gt;&lt;span style="font-family: Calibri;" face="Calibri"&gt;See existing implementations on CustInvoiceLine, VendInvoiceInfoLine and PurchLine tables for examples related to Customer Invoice, Vendor Invoice and Purchase Order documents respectively.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: medium;"&gt;&lt;span style="font-family: Calibri;" size="3" face="Calibri"&gt;c)&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span size="3"&gt;&lt;span style="font-family: Calibri;" face="Calibri"&gt;You may need to also modify your header table to be able to act like a line if you expect any accounting related to monetary amounts on the header. In AX 2012 an example of header related amount for which distributions are being created is Round-off (VendInvoiceInfoTable.InvoiceRoundOff).&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;span style="font-size: medium;"&gt;&lt;span size="3"&gt;&lt;span style="font-family: Calibri;" face="Calibri"&gt;In this case the header table needs do go through the same steps as the above step 2b described for the line table.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-size: medium;"&gt;&lt;span size="3"&gt;&lt;span style="font-family: Calibri;" face="Calibri"&gt;Add the enum value for the totals line (MyDocumentTotalsLine = 2) to the SourceDocumentLine_MyDocument enum which you created in step 2b.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;span style="font-family: Calibri; font-size: medium;" size="3" face="Calibri"&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: medium;" size="3"&gt;&lt;span style="font-family: Calibri;" face="Calibri"&gt;Below is a data model diagram outlining the important relationships between your tables and the framework tables:&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-50-86/1185.mydocument.png"&gt;&lt;img border="0" alt="" src="http://blogs.msdn.com/resized-image.ashx/__size/550x295/__key/communityserver-blogs-components-weblogfiles/00-00-01-50-86/1185.mydocument.png" /&gt;&lt;/a&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-50-86/2620.mydocument.png"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: medium;" size="3"&gt;&lt;span style="font-family: Calibri;" face="Calibri"&gt;Next - &lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: medium;" size="3"&gt;&lt;span style="font-family: Calibri;" face="Calibri"&gt;&lt;a href="http://blogs.msdn.com/b/ax_gfm_framework_team_blog/archive/2012/05/01/step-3-perform-initial-wiring-to-source-document-framework-document-classes.aspx"&gt;&lt;strong&gt;Step 3:&lt;/strong&gt; Perform initial wiring to Source Document Framework &amp;ndash; document classes&lt;/a&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10298240" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/b/ax_gfm_framework_team_blog/archive/tags/Dynamics+AX/">Dynamics AX</category><category domain="http://blogs.msdn.com/b/ax_gfm_framework_team_blog/archive/tags/GFM/">GFM</category><category domain="http://blogs.msdn.com/b/ax_gfm_framework_team_blog/archive/tags/Source+Document+Framework/">Source Document Framework</category></item><item><title>Step 1: Prerequisite - create your document</title><link>http://blogs.msdn.com/b/ax_gfm_framework_team_blog/archive/2012/04/26/step-1-prerequisite-create-your-document.aspx</link><pubDate>Thu, 26 Apr 2012 22:11:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10298235</guid><dc:creator>Jarek Wyganowski</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/ax_gfm_framework_team_blog/rsscomments.aspx?WeblogPostID=10298235</wfw:commentRss><comments>http://blogs.msdn.com/b/ax_gfm_framework_team_blog/archive/2012/04/26/step-1-prerequisite-create-your-document.aspx#comments</comments><description>&lt;p&gt;&lt;span style="font-size: medium;" size="3"&gt;&lt;span style="font-family: Calibri;" face="Calibri"&gt;At this point you should not be concerned about Source Document Framework, but only about the document storage, UI and perhaps some domain logic responsible for processing the document. Storage usually consists of two tables, one for storing document header information (MyDocumentHeader) and another one to store document lines information (MyDocumentLine). The UI usually requires creating a list page and a document entry form. The List page and the form would be using the domain logic tables and classes that implement whatever functionality is required for the document.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: Calibri; font-size: medium;" size="3" face="Calibri"&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: medium;" size="3"&gt;&lt;span style="font-family: Calibri;" face="Calibri"&gt;The subsequent steps will be outlining how to employ Source Document Framework for your newly created document. &lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: medium;" size="3"&gt;&lt;span style="font-family: Calibri;" face="Calibri"&gt;For additional examples and detailed code samples refer to existing source document extensions in Dynamics AX 2012. &lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: medium;" size="3"&gt;&lt;span style="font-family: Calibri;" face="Calibri"&gt;A good example of a less complex document is Free Text Invoice. Good examples of complex documents are Vendor Invoice and Purchase Order. &lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: medium;" size="3"&gt;&lt;span style="font-family: Calibri;" face="Calibri"&gt;Refer to classes and tables related to SourceDocument_CustomerInvoice and SourceDocumentLine_CustomerInvoice enums for Free Text Invoice source document extension code.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: medium;" size="3"&gt;&lt;span style="font-family: Calibri;" face="Calibri"&gt;Refer to classes and tables related to SourceDocument_VendorInvoice and SourceDocumentLine_VendorInvoice enums for Vendor Invoice source document extension code.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: medium;" size="3"&gt;&lt;span style="font-family: Calibri;" face="Calibri"&gt;Refer to classes and tables related to SourceDocument_ProductOrder and SourceDocumentLine_ProductOrder enums for Purchase Order source document extension code.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: medium;" size="3"&gt;&lt;span style="font-family: Calibri;" face="Calibri"&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: medium;" size="3"&gt;&lt;span style="font-family: Calibri;" face="Calibri"&gt;Next - &lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: medium;" size="3"&gt;&lt;span style="font-family: Calibri;" face="Calibri"&gt;&lt;a href="http://blogs.msdn.com/b/ax_gfm_framework_team_blog/archive/2012/04/26/step-2-perform-initial-wiring-to-source-document-framework-tables-and-maps.aspx"&gt;&lt;strong&gt;Step 2:&lt;/strong&gt; Perform initial wiring to Source Document Framework &amp;ndash; tables and maps&lt;/a&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10298235" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/b/ax_gfm_framework_team_blog/archive/tags/Dynamics+AX/">Dynamics AX</category><category domain="http://blogs.msdn.com/b/ax_gfm_framework_team_blog/archive/tags/GFM/">GFM</category><category domain="http://blogs.msdn.com/b/ax_gfm_framework_team_blog/archive/tags/Source+Document+Framework/">Source Document Framework</category></item><item><title>Extending the Source Document Framework</title><link>http://blogs.msdn.com/b/ax_gfm_framework_team_blog/archive/2012/04/26/extending-the-source-document-framework.aspx</link><pubDate>Thu, 26 Apr 2012 21:59:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10298230</guid><dc:creator>Jarek Wyganowski</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/ax_gfm_framework_team_blog/rsscomments.aspx?WeblogPostID=10298230</wfw:commentRss><comments>http://blogs.msdn.com/b/ax_gfm_framework_team_blog/archive/2012/04/26/extending-the-source-document-framework.aspx#comments</comments><description>&lt;p&gt;&lt;span style="font-size: medium;" size="3"&gt;&lt;span style="font-family: Calibri;" face="Calibri"&gt;The upcoming series of blog&amp;nbsp;posts is created to help developers new to Source Document Framework flatten the learning curve and quickly get up and running with their own source document extensions.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: medium;" size="3"&gt;&lt;span style="font-family: Calibri;" face="Calibri"&gt;The information presented here is covering the mainstream scenario. &lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: medium;" size="3"&gt;&lt;span style="font-family: Calibri;" face="Calibri"&gt;It is divided into 6 steps:&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: medium;" size="3"&gt;&lt;span style="font-family: Calibri;" face="Calibri"&gt;&lt;a href="http://blogs.msdn.com/b/ax_gfm_framework_team_blog/archive/2012/04/26/step-1-prerequisite-create-your-document.aspx"&gt;&lt;strong&gt;Step 1:&lt;/strong&gt; Prerequisite - create your document&lt;/a&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: medium;" size="3"&gt;&lt;span style="font-family: Calibri;" face="Calibri"&gt;&lt;a href="http://blogs.msdn.com/b/ax_gfm_framework_team_blog/archive/2012/04/26/step-2-perform-initial-wiring-to-source-document-framework-tables-and-maps.aspx"&gt;&lt;strong&gt;Step 2:&lt;/strong&gt; Perform initial wiring to Source Document Framework &amp;ndash; tables and maps&lt;/a&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: medium;" size="3"&gt;&lt;span style="font-family: Calibri;" face="Calibri"&gt;&lt;a href="http://blogs.msdn.com/b/ax_gfm_framework_team_blog/archive/2012/05/01/step-3-perform-initial-wiring-to-source-document-framework-document-classes.aspx"&gt;&lt;strong&gt;Step 3:&lt;/strong&gt; Perform initial wiring to Source Document Framework &amp;ndash; document classes&lt;/a&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: medium;" size="3"&gt;&lt;span style="font-family: Calibri;" face="Calibri"&gt;&lt;a href="http://blogs.msdn.com/b/ax_gfm_framework_team_blog/archive/2012/05/03/step-4-add-source-document-framework-forms-to-your-document-ui.aspx"&gt;&lt;strong&gt;Step 4:&lt;/strong&gt; Add Source Document Framework forms to your document UI&lt;/a&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: medium;" size="3"&gt;&lt;span style="font-family: Calibri;" face="Calibri"&gt;&lt;a href="http://blogs.msdn.com/b/ax_gfm_framework_team_blog/archive/2012/05/07/step-5-add-code-to-distribute-and-journalize-source-document-amounts.aspx"&gt;&lt;strong&gt;Step 5:&lt;/strong&gt; Add code to distribute and journalize source document amounts&lt;/a&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: medium;" size="3"&gt;&lt;span style="font-family: Calibri;" face="Calibri"&gt;&lt;a href="http://blogs.msdn.com/b/ax_gfm_framework_team_blog/archive/2012/05/10/step-6-implement-confirmation-posting-of-your-document.aspx"&gt;&lt;strong&gt;Step 6:&lt;/strong&gt; Implement confirmation/posting of your document&lt;/a&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10298230" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/b/ax_gfm_framework_team_blog/archive/tags/Dynamics+AX/">Dynamics AX</category><category domain="http://blogs.msdn.com/b/ax_gfm_framework_team_blog/archive/tags/GFM/">GFM</category><category domain="http://blogs.msdn.com/b/ax_gfm_framework_team_blog/archive/tags/Source+Document+Framework/">Source Document Framework</category></item><item><title>Welcome!</title><link>http://blogs.msdn.com/b/ax_gfm_framework_team_blog/archive/2012/04/25/welcome.aspx</link><pubDate>Wed, 25 Apr 2012 18:30:47 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10297711</guid><dc:creator>John Healy - Microsoft Dynamics</dc:creator><slash:comments>2</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/ax_gfm_framework_team_blog/rsscomments.aspx?WeblogPostID=10297711</wfw:commentRss><comments>http://blogs.msdn.com/b/ax_gfm_framework_team_blog/archive/2012/04/25/welcome.aspx#comments</comments><description>&lt;p&gt;&lt;span style="font-size: medium;"&gt;Hello!&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;&lt;span style="font-size: medium;"&gt;Welcome to the Microsoft Dynamics AX Global Financial Management (GFM) team blog. My name is John Healy. I am a Principal Software Architect on the GFM team. I&amp;rsquo;m very excited to launch this blog. This blog will focus on providing technical and application information related to the frameworks and applications for which the GFM team is responsible. Our first series of blog postings will be focusing on extending the source document framework. The source document framework was introduced in AX 2012. It provides a model for defining source documents, documenting business events, and recording the accounting impact of the business events.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;&lt;span style="font-size: medium;"&gt;Stay tuned!&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: medium;"&gt;John&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10297711" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/b/ax_gfm_framework_team_blog/archive/tags/Dynamics+AX/">Dynamics AX</category><category domain="http://blogs.msdn.com/b/ax_gfm_framework_team_blog/archive/tags/GFM/">GFM</category></item></channel></rss>