what are you looking for ? Do you need to join these tables and get the serial Id as display field in SalesLine in Ax ?
Try this .
InventDim::find(SalesLine.InventDimId).inventSerialId
or
Select firstOnly inventDim
Join salesLine
where inventDim.inventDimId == salesLine.InventDimId;
info(inventDim.inventSerialId);