Code to find active dimension of item in MSD axapta

Code to find active dimension of item in axapta

 public boolean isConfigIdActive(ItemId _item)  
 {  
 InventDimSearch FindDim = new InventDimSearch();  
   InventTable   inventTable;  
   ;  
   inventTable = InventTable::find(_item);  
   if(FindDim.find(inventTable.DimGroupId, fieldnum(InventDim,ConfigId)))  
   {  
     return FindDim.dimActive();  
   }  
   return false;  
 }