How to get default dimensions for Vendor and Customer in dynamics ax 2012

I used following code for this


CustTable custTable = CustTable::find(“1101”);
VendTable _VendTable= VendTable::find(‘54278’);

DimensionAttributeValueSetStorage dimStorage;
Counter i;

dimStorage = DimensionAttributeValueSetStorage::find(_VendTable.DefaultDimension );

for (i=1 ; i<= dimStorage.elements() ; i++)
info(strFmt(“%1 = %2”, DimensionAttribute::find(dimStorage.getAttributeByIndex(i)).Name,


Advisory software engineer, Software engineer, Last 4 years focus on Dynamics Ax 2012. MVP and Microsoft Certified trainer for Dynamics AX.