Hi All,
Is there any way to display a field part of default dimension to the grid form control without using display method? I can do this through display method but the user cannot do filtering by this field therefore it is not appropriate.
Here is my display method approach:
X++:
display public DimensionValue displayDefaultDimCostCenter()
{
DimensionAttributeValueset dimAttrValueSet;
DimensionAttributeValueSetItem dimAttrValueSetItem;
DimensionAttributeValue dimAttrValue;
DimensionAttribute dimAttr;
select firstOnly dimAttr
where dimAttr.Name == "CostCenter";
select dimAttrValueSet
where dimAttrValueSet.RecId == this.DefaultDimension
join dimAttrValueSetItem
where dimAttrValueSetItem.DimensionAttributeValueSet == dimAttrValueSet.RecId
join dimAttrValue
where dimAttrValueSetItem.DimensionAttributeValue == dimAttrValue.RecId
&& dimAttrValue.DimensionAttribute == dimAttr.RecId;
return dimAttrValueSetItem.DisplayValue;
}
But I would like to add CostCenter default financial dimension (outlined to the screen shot) to a grid control in my custom form which datasource is SalesTable, so the user can do filtering and sorting the grid control by CostCenter.
Is there any way to do that?
Thank you in dvance.