If you want to find inventdimid in axapta then you can try following code. This example also shows you how to create inventdimid.
InventDim inventDim;
;
// Set the values that you need for
// the journal or transaction
inventDim.InventLocationId = "01";
inventDim.InventColorId = "02";
// Use findOrCreate and use the inventDim
// variable that you have set values into
inventDim = InventDim::findOrCreate(inventDim);
// Use the inventDimId to link to the
// InventDim record that was either
// found or created
info(inventDim.inventDimId);