title: Dynamic AX 2012 R3 Write Empty Financial Dimensions of Customer
body: <p>How can i write all dimensions of customer? I can use this code but it result just Department = 022. </p>
  
  <pre><code>CustTable                         custTable = CustTable::find("10112");
  DimensionAttributeValueSetStorage dimStorage;
  Counter i;
  
  dimStorage = DimensionAttributeValueSetStorage::find(custTable.DefaultDimension);
  
  for (i=1 ; i&lt;= dimStorage.elements() ; i++)
  {
      info(strFmt("%1 = %2", DimensionAttribute::find(dimStorage.getAttributeByIndex(i)).Name,
                             dimStorage.getDisplayValueByIndex(i)));
  </code></pre>
  
  <p>But i want if dimension is empty result is empty. For the example below result should be like this;</p>
  
  <pre><code>BusinessUnit = 
  Department   = 022
  Project      = 
  ServiceLine  =
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/MPvFL.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/MPvFL.png" alt="related image"></a></p>
  
  <p>How can i do this?</p>