Problem:How to get Financial Dimension from Purchase order AX 2012 X++?
Solution :
public str getDimensionCombinationValues(PurchTable _purch,str _val)
{
PurchID _purchId = "";
DimensionAttributeValueSet dimAttrValueSet;
DimensionAttributeValueSetItem dimAttrValueSetItem;
DimensionAttributeValue dimAttrValue;
DimensionAttribute dimAttr;
Common dimensionValueEntity;
DimensionValue dimensionValue;
DimensionAliasName dimensionName;
;
dimAttrValueSet = DimensionAttributeValueSet::find(_purch.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);
dimensionValue = dimAttrValue.getValue();
if(dimAttr.Name == _val)
{
dimensionValue = dimAttrValue.getValue();
dimensionName = dimAttr.Name;
break;
}
}
return dimensionValue;
}
Solution :
public str getDimensionCombinationValues(PurchTable _purch,str _val)
{
PurchID _purchId = "";
DimensionAttributeValueSet dimAttrValueSet;
DimensionAttributeValueSetItem dimAttrValueSetItem;
DimensionAttributeValue dimAttrValue;
DimensionAttribute dimAttr;
Common dimensionValueEntity;
DimensionValue dimensionValue;
DimensionAliasName dimensionName;
;
dimAttrValueSet = DimensionAttributeValueSet::find(_purch.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);
dimensionValue = dimAttrValue.getValue();
if(dimAttr.Name == _val)
{
dimensionValue = dimAttrValue.getValue();
dimensionName = dimAttr.Name;
break;
}
}
return dimensionValue;
}
quiscinsubsfu Miranda Burden https://wakelet.com/wake/PnuUbHdcJIwRShseJlCkm
ReplyDeletemephasynbi
bimelOcaepa Tiffany Cannon Adobe Audition
ReplyDeletePinnacle Studio
FixMeStick
reufurmager