Hi developers, I am writing this blog for helping one of my internet friend who asked for my help.
Query - How to get Financial Dimension Cost Center value for the Report in Dynamics AX? He needs financial dimension cost center value for Purchase order report.
Solution Query:
select distinct CC.NAME,D1.DIMENSIONATTRIBUTEVALUESET
from dbo.PURCHTABLE P
join dbo.PURCHLINE PL on P.PURCHID = PL.PURCHID
left join DIMENSIONATTRIBUTEVALUESETITEM D1 on D1.DIMENSIONATTRIBUTEVALUESET = PL.DEFAULTDIMENSION
left join DIMENSIONATTRIBUTEVALUE D2 on D2.RECID = D1.DIMENSIONATTRIBUTEVALUE
left join DIMENSIONATTRIBUTE D3 on D3.RECID = D2.DIMENSIONATTRIBUTE
left join DimAttributeOMCostCenter CC on CC.VALUE = D1.DISPLAYVALUE
where D3.NAME = 'CostCenter'
Hope you find the article helpful and interesting. For any query, comment us below.
Keep learning and sharing...
No comments:
Post a Comment