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.
Technical Tutorials x++,tips on issues or troubleshooting On Ax ERP ,Microsoft Dynamics 365,Ax 2012,Microsoft , U.S.,Business Software solution.