static void THK_7519_getFinDimension(Args _args)
{
void getDimensionValue(RecId _recIdFinDimension)
{
CustTable custTable = CustTable::find("1101");
DimensionAttributeValueSetStorage dimStorage;
Counter i;
dimStorage = DimensionAttributeValueSetStorage::find(_recIdFinDimension);//custTable.DefaultDimension);
setPrefix(strFmt("RecId :%1",_recIdFinDimension));
for (i=1 ; i<= dimStorage.elements() ; i++)
{
info(strFmt("%1,%2 = %3",i,DimensionAttribute::find(dimStorage.getAttributeByIndex(i)).Name,
dimStorage.getDisplayValueByIndex(i)));
}
}
;
getDimensionValue(22565430233);
}
---------------------------------------------------------------------------------------------------
static void THK_7519_getFinDimensionByName(Args _args)
{
DimensionValue getDimensionValue(RefRecID _dimensionSetRecID,Name _attributeName = "Shop_HK")
{
DimensionAttributeValueSet dimAttrValueSet;
DimensionAttributeValueSetItem dimAttrValueSetItem;
DimensionAttributeValue dimAttrValue;
DimensionAttribute dimAttribute;
;
dimAttrValueSet = DimensionAttributeValueSet::find(_dimensionSetRecID);
select firstOnly dimAttrValueSetItem
where dimAttrValueSetItem.DimensionAttributeValueSet == dimAttrValueSet.RecId
join dimAttrValue
where dimAttrValue.RecId == dimAttrValueSetItem.DimensionAttributeValue
join dimAttribute
where dimAttribute.RecId == dimAttrValue.DimensionAttribute
&& dimAttribute.Name == _attributeName;
return dimAttrValue.getValue();
}
;
info(getDimensionValue(22565430233));
}
没有评论:
发表评论