Get financial dimension value and description payment journal x++

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

        select firstonly _DimensionAttribute where _DimensionAttribute.DimensionKeyColumnName == "Purpose";

        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;

    }

Leave Comment

Your email address will not be published. Required fields are marked *