why we using DimId, what this actually do, what purpose we are using this?
Do you mean the inventory dimension Id (InventDimId)?
inventdimId is the identical field of inventdim table where we are actully storing the different combination of dimensions
you can refer below link
InventDimId - holds a combination of the inventory dimensions(product, storage and tracking dimenions). Unique per every combination. For any item you can decide what dimension it should have(by configuring the dimension groups). Based on this setup you will be selecting the relevant dimensions for every transaction you do for that item. So instead of adding all the dimensions to the related table(purchLine, salesLine etc), it was been designed to add InventDimId.
So based on the selected dimensions the inventDimId will be created(if it doesn’t exist) and assigned to the relevant transactions.
InventDim is the table that holds all the dimension id’s and its related dimensions information .
Thanks Kranthi, Is InventDimId is auto generated?
Yes, Look at InventDim::findOrCreate()