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

Best Practices for Troubleshooting Application Issues in D365 and Power Platform

When facing application issues, it’s important to systematically troubleshoot before reaching out for support.  Follow these steps to ensure...