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;
}
)
our blog resource here
Microsoft Dynamics 365 Finance and Operations Technical Consultant | Team Lead | Microsoft Certified Developer
2 年Nice effort ??.