Get Even More Visitors To Your Blog, Upgrade To A Business Listing >>

get Financial dimension from Purchase Order AX 2012 X++

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;
}


This post first appeared on Cloud Computing And Dynamics Technology, please read the originial post: here

Share the post

get Financial dimension from Purchase Order AX 2012 X++

×

Subscribe to Cloud Computing And Dynamics Technology

Get updates delivered right to your inbox!

Thank you for your subscription

×