Tuesday, 30 December 2014

Job to get Financial dimension Values in AX 2012

static void FinancialDimension(Args _args)
{
    DimensionAttributeValueSet      dimensionAttributeValueSet;
    DimensionAttributeValueSetItem  dimensionAttributeValueSetItem;
    DimensionAttributeValue         dimensionAttributeValue;
    DimensionFinancialTag           dimensionFinancialTag;
    ProjTable                       projTable;
   
    Select projTable  
       join dimensionAttributeValueSet
           where dimensionAttributeValueSet.RecId == projTable.DefaultDimension
           && projTable.ProjId == "000002"
       join dimensionAttributeValueSetItem
           where dimensionAttributeValueSetItem.DimensionAttributeValueSet == dimensionAttributeValueSet.RecId
       join dimensionAttributeValue
           where dimensionAttributeValue.RecId == dimensionAttributeValueSetItem.DimensionAttributeValue
       join dimensionFinancialTag 
           where dimensionFinancialTag.RecId == dimensionAttributeValue.EntityInstance;
          
       info(strFmt("Description%1", dimensionFinancialTag.Description));
}
  

2 comments:

  1. how to insert value Default dimension in table ?

    please

    ReplyDelete
    Replies
    1. Container offdefault;
      TableBuffer TableBuffer;
      offdefault = [1,"SUBACCOUNTS",'1000'];
      Note: 1 is the number of dimensions
      Subaccount is the dimension attribute name
      1000 is the dimension value
      TableBuffer.DefaultDimension=AxdDimensionUtil::getDimensionAttributeValueSetId(offdefault);

      Delete

Calculate ledger balance by dimension set in X++ in AX2012/Dynamics 365 FO

There are a variety of ways users can view balances in the general ledger. Some of the most common options are: 1. Trial balance 2. Financia...