<?xml version="1.0" encoding="utf-8"?>
<?xml-stylesheet type="text/css" href="https://www.schweda.net/style_feed.css" ?>
<rss version="2.0" 
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
    xmlns:atom="http://www.w3.org/2005/Atom"	
	xmlns:dc="http://purl.org/dc/elements/1.1/" > 
<channel>
    <title>schweda.net - Blog</title>
    <link>https://www.schweda.net/</link>
    <description>schweda.net - Blog - Blog-Beitraege</description>
    <language>de-at</language>
    <copyright>Copyright 2006-2026</copyright>
    <generator>schweda.net</generator>
    <managingEditor>heinz.schweda@schweda.net (Heinz Schweda)</managingEditor>
    <webMaster>heinz.schweda@schweda.net (Heinz Schweda)</webMaster>
    <category>Blog</category>
	<atom:link href="https://schweda.net/blog_rss.php?bid=432" rel="self" type="application/rss+xml" />
<item>
<title><![CDATA[AX 2012: Standardfinanzdimension eines Datensatzes auslesen und ausgeben]]></title>
<description><![CDATA[
<p>Im folgenden Job werden die eingetragenen Standardfinanzdimensionen eines Datensatzes - im konkreten Fall die eines bestimmten Debitoren - ausgegeben.
</p>

<div class="div_blog_axcode">static void getDimensionsFromDefaultDimension(Args _args)<br />
{<br />
&nbsp;&nbsp;&nbsp; DimensionAttributeValueSet dimensionAttributeValueSet;<br />
&nbsp;&nbsp;&nbsp; DimensionAttributeValueSetItem dimensionAttributeValueSetItem;<br />
&nbsp;&nbsp;&nbsp; DimensionAttributeValue&nbsp;dimensionAttributeValue;<br />
&nbsp;&nbsp;&nbsp; DimensionAttribute dimensionAttribute;<br />
&nbsp;&nbsp;&nbsp; Common dimensionValueEntity;<br />
<br />
&nbsp;&nbsp;&nbsp; dimensionAttributeValueSet = DimensionAttributeValueSet::find(CustTable::find('9101').DefaultDimension);<br />
<br />
&nbsp;&nbsp;&nbsp; // Find all of the 'value set items' linked against the 'value set'<br />
&nbsp;&nbsp;&nbsp; while select dimensionAttributeValueSetItem<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; where&nbsp;&nbsp; dimensionAttributeValueSetItem.DimensionAttributeValueSet&nbsp;== dimensionAttributeValueSet.RecId<br />
&nbsp;&nbsp;&nbsp; {<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; // Find the dimension 'value' (DimensionAttributeValue) that the set item points to.<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; dimensionAttributeValue = DimensionAttributeValue::find(dimensionAttributeValueSetItem.DimensionAttributeValue);<br />
<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; // Find the underlying attribute.<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; dimensionAttribute = DimensionAttribute::find(dimensionAttributeValue.DimensionAttribute);<br />
<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; // Use the helper class to obtain a reference to the underlying entity (can be anything)<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; dimensionValueEntity = DimensionDefaultingControllerBase::findBackingEntityInstance(<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; curext(),<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; dimensionAttribute,<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; dimensionAttributeValue.EntityInstance);<br />
<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; info(strFmt(&quot;%1: %2&quot;, dimensionAttribute.Name, dimensionAttributeValue.getValue()));<br />
&nbsp;&nbsp;&nbsp; }<br />
}
</div>]]></description>
<category>Microsoft Dynamics AX (Axapta)</category>
<pubDate>Wed, 09 May 2012 20:00:00 +0200</pubDate>
<link>https://www.schweda.net/blog_ax.php?bid=432</link>
<comments>https://www.schweda.net/blog_ax.php?bid=432</comments>
<guid isPermaLink="true">https://www.schweda.net/blog_ax.php?bid=432</guid>
<author>heinz.schweda@schweda.net (Heinz Schweda)</author>
<wfw:commentRss>https://www.schweda.net/blog_ax.php?bid=432</wfw:commentRss>
</item>
</channel>
</rss>	
