Get Financial dimensions for Customer payment journal D365 X++

Get Financial dimensions for Customer payment journal D365 X++


public   DimensionFinancialTag getDimensionDisplay(LedgerJournalTable _LedgerJournalTable , str DimensionKeyColumnName 
    {
        DimensionAttributeValueSet _DimensionAttributeValueSet;
        DimensionAttributeValueSetItem _DimensionAttributeValueSetItem;
        DimensionAttributeValue _DimensionAttributeValue;
        DimensionFinancialTag _DimensionFinancialTag;
        DimensionAttribute _DimensionAttribute;

        select firstonly _DimensionAttribute where _DimensionAttribute.DimensionKeyColumnName == DimensionKeyColumnName;  //DimensionKeyColumnName ->"Purpose" -"Department"-"Center";

        select _DimensionAttributeValueSet
            where
            _DimensionAttributeValueSet.RecId == _LedgerJournalTable.DefaultDimension

            join _DimensionAttributeValueSetItem
            where
            _DimensionAttributeValueSet.RecId == _DimensionAttributeValueSetItem.DimensionAttributeValueSet

            join _DimensionAttributeValue
            where
            _DimensionAttributeValueSetItem.DimensionAttributeValue ==_DimensionAttributeValue.RecId

            && _DimensionAttributeValue.DimensionAttribute ==_DimensionAttribute.RecId

            join  _DimensionFinancialTag
            where
            _DimensionAttributeValue.EntityInstance ==_DimensionFinancialTag.RecId;

            return _DimensionFinancialTag;

    }


)        
No alt text provided for this image

our blog resource here

Sheikh Abdul Fahad

Microsoft Dynamics 365 Finance and Operations Technical Consultant | Team Lead | Microsoft Certified Developer

2 年

Nice effort ??.

回复

要查看或添加评论,请登录

社区洞察

其他会员也浏览了