Показать сообщение отдельно
Старый 18.10.2014, 17:47   #1  
ist is offline
ist
Участник
 
60 / 10 (1) +
Регистрация: 29.07.2007
Default dimension sttribute value as a field on grid
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.
Миниатюры
Нажмите на изображение для увеличения
Название: sales_order_defdim.png
Просмотров: 512
Размер:	85.2 Кб
ID:	9001