Below code can be used for finding out the display value of a default dimension.
VendTable vendTable;
DimensionAttributeValueSet dimAttrValueSet;
DimensionAttributeValueSetItem dimAttrValueSetItem;
DimensionAttributeValue dimAttrValue;
DimensionAttribute dimAttr;
Common dimensionValueEntity;
;
vendTable = VendTable::find(‘VEND_001’);
dimAttrValueSet = DimensionAttributeValueSet::find(vendTable.DefaultDimension);
while select dimAttrValueSetItem
where dimAttrValueSetItem.DimensionAttributeValueSet == dimAttrValueSet.RecId
{
dimAttrValue = DimensionAttributeValue::find(dimAttrValueSetItem.DimensionAttributeValue);
dimAttr = DimensionAttribute::find(dimAttrValue.DimensionAttribute);
dimensionValueEntity = DimensionDefaultingControllerBase::findBackingEntityInstance(curext(),
dimAttr, dimAttrValue.EntityInstance);
info(dimAttr.Name + ' ' + dimAttrValue.getValue());
}
VendTable vendTable;
DimensionAttributeValueSet dimAttrValueSet;
DimensionAttributeValueSetItem dimAttrValueSetItem;
DimensionAttributeValue dimAttrValue;
DimensionAttribute dimAttr;
Common dimensionValueEntity;
;
vendTable = VendTable::find(‘VEND_001’);
dimAttrValueSet = DimensionAttributeValueSet::find(vendTable.DefaultDimension);
while select dimAttrValueSetItem
where dimAttrValueSetItem.DimensionAttributeValueSet == dimAttrValueSet.RecId
{
dimAttrValue = DimensionAttributeValue::find(dimAttrValueSetItem.DimensionAttributeValue);
dimAttr = DimensionAttribute::find(dimAttrValue.DimensionAttribute);
dimensionValueEntity = DimensionDefaultingControllerBase::findBackingEntityInstance(curext(),
dimAttr, dimAttrValue.EntityInstance);
info(dimAttr.Name + ' ' + dimAttrValue.getValue());
}
No comments:
Post a Comment