Home

Tuesday, December 2, 2014

Printing dimension value of customer or vendor Ax 2012

static void ShowcustDefaultDimensions(Args _args)
{
CustTable custTable;
DimensionAttributeValueSet dimAttrValueSet;
DimensionAttributeValueSetItem dimAttrValueSetItem;
DimensionAttributeValue dimAttrValue;
;

custtable = Custtable::find(‘Customer Id’);

while select dimAttrValue
exists join dimAttrValueSetItem
exists join dimAttrValueSet
where dimAttrValueSet.RecId == custTable.DefaultDimension &&
dimAttrValueSetItem.DimensionAttributeValueSet == dimAttrValueSet.RecId &&
dimAttrValue.RecId == dimAttrValueSetItem.DimensionAttributeValue
{
print dimAttrValue.getValue();
}
pause;
}

No comments:

Post a Comment