Search code examples
dynamics-ax-2012-r3

DMF and Advanced accounting structure


I have 10 dimensions in standard accounting structure and 7 dimensions defined in advanced rule.

Importing journals through DMF in excel throws error for 17 dimensions but works with 10 dimensions.

What's the right way to resolve this?


Solution

  • I got the solution. The issue was in generateDynamicDimension() method in DmfDimensionHelper Class.

    Although It was bringing in all the dimensions values from the Segmented Entry Dimension column from Excel Sheet, it was picking only those Dimension names from the table where DimensionHierarchyType is AccountStructure and not from the Advanced Rule. I included DimensionHierarchyType of AccountRuleStructure as well. Now it's working.

    while select Level from dimHierarchyLevel
        order by dimHierarchyLevel.DimensionHierarchy, dimHierarchyLevel.Level
            where (dimHierarchyLevel.DimensionHierarchy == dimHierarchyId
            && dimHierarchy.IsDraft == false
            && dimHierarchy.IsSystemGenerated == false
            && (dimHierarchy.StructureType == DimensionHierarchyType::AccountStructure || dimHierarchy.StructureType == DimensionHierarchyType::AccountRuleStructure) 
        join * from dimAttribute where
        dimAttribute.RecId == dimHierarchyLevel.DimensionAttribute
        exists join ledgerStructure
        where ledgerStructure.DimensionHierarchy == dimHierarchy.RecId
            && ledgerStructure.Ledger == Ledger::current()
    

    This is the additional Condtition I entered:

    dimHierarchy.StructureType == DimensionHierarchyType::AccountRuleStructure