To Define dimension values to container in ax 2012 you can try below code same way you can do for other dimension values like department,region ,store etc.
DimensionDefault defaultDimension;
str costcenter;
Container con,defDimension,ledgerDimension;
costcenter="0122";
if(costcenter)
{
defDimension = ["COSTCENTRE",costcenter];
}
defDimension = [1] + defDimension;
You can use defDimension value to AxdDimensionUtil::getDimensionAttributeValueSetId method to get default dimension recid as per provided values.
DimensionDefault defaultDimension;
str costcenter;
Container con,defDimension,ledgerDimension;
costcenter="0122";
if(costcenter)
{
defDimension = ["COSTCENTRE",costcenter];
}
defDimension = [1] + defDimension;
You can use defDimension value to AxdDimensionUtil::getDimensionAttributeValueSetId method to get default dimension recid as per provided values.