Monday, September 13, 2021

How to get Financial Dimension 'Cost Center' value for the Report in D365fo

 How to get Financial Dimension 'Cost Center' value using X++

    static void displayCostCenterDimension() { DimensionAttributeValueSetStorage dimensionAttributeValueSetStorage ; DimensionAttribute dimensionAttribute; VendTable vendTable; DimensionValue dimensionValue; ; #define.DimensionName("CostCenter") while select vendTable { dimensionAttributeValueSetStorage = dimensionAttributeValueSetStorage::find(                                                                vendTable.DefaultDimension);

dimensionAttribute = dimensionAttribute::findbyname(#DimensionName); dimensionValue = dimensionAttributeValueSetStorage.getDisplayValueByDimensionAttribute( dimensionAttribute.recId); info(dimensionValue); } }

Keep daxing!!


No comments:

Post a Comment