Showing posts with label Ledger Dimension. Show all posts
Showing posts with label Ledger Dimension. Show all posts

Ledger Dimension D365FO



Ledger Dimension AX2012 & D365FO



In AX -2012 We use DimensionStorage class and method getDynamicAccount to get the Ledger dimension of the following accounts.

For Instance 
DimensionStorage::getDynamicAccount("ABC",LedgerJournalACType::Ledger);
  1. Ledger
  2. Cust
  3. Vend
  4. Project
  5. FixedAssets
  6. Bank
In D365FO  DimensionStorage is removed and the new class introduces LedgerDynamicAccountHelper to get the Ledger dimension of the following accounts.

For Instance 


LedgerDynamicAccountHelper::getDynamicAccountFromAccountNumber("Project-001",LedgerJournalACType::Project);


Support Faryal's Cusine


Active Ledger Dimension


Active Ledger Dimension 


You can use the following code sample to tet ledger dimension values for active account structure in AX 2012 & D365FO


  public static DimensionValue getdimensionValue(LedgerDimensionAccount _ledgerDimension, Name _dimensionName )
    {
        DimensionAttributeLevelValueAllView dimAttrView; //View that will display all values for ledger dimensionsDimensionAttribute dimAttr; //Main dimension attribute table

        select DisplayValue from dimAttrViewwhere dimAttrView.ValueCombinationRecId == _ledgerDimension //generalJournalAccountEntry.LedgerDimensionjoin BackingEntityType from dimAttrwhere dimAttr.RecId == dimAttrView.DimensionAttribute&& dimAttr.Name == _dimensionName; // Dimension field name
        return dimAttrView.DisplayValue;
    }

Support Faryal's Cusine


Virtual Fields Vs Computed Fields

  Virtual Field: A virtual field in D365FO is a field that doesn't have a direct representation in the database. It's a field that y...