
I need to validate if the selected lines in the BOM have the same WHS. I noticed that the ProdBOM table has a relationship with the InventDim table, but the relationship is based on the InventDimID field that also stores information about InventSiteId. I need to check if the InventLocationId is the same for each line. How can I do this? The code is written in the active method.
Simply find the InventDim record for the given InventDimId and look at the InventLocationId there.
By the way, I don't understand what problem you have with InventSiteId. If InventLocationId is the same, InventSiteId must be the same too, therefore it doesn't change anything.