how to get the inventdimid value form the itemid in ax 2012 ?

hi all ,

i develop a report which stock sales , based on itemid ,i want to get the inventdimid , all the table strucutre changed in 2012

can any body know pls help me

thanks

srikanth

select RecId from ecoResProductMasterLocal

where ecoResProductMasterLocal.DisplayProductNumber == “611261104”;

while select * from ecoResproductMasterConfiguration

where ecoResproductMasterConfiguration.ConfigProductMaster == ecoResProductMasterLocal.RecId

{

//wip

//tmpInventDimId = configTable.inventDim().inventDimId;

inventDim.clear();

inventDim.ConfigId = EcoResConfiguration::find(ecoResproductMasterConfiguration.Configuration).Name;

tmpInventDimId = inventdim::findOrCreate(inventDim).inventDimId;