Custom Script with custom fields

Hi All,
I’m trying to calculate ‘volume’ of an item.
Cutom fileds created in the items form (length, width, height and volume)
volume_uom = length * width * heght ;

I have created the following script


I wonder if Custom UOM and UOM Conversion Factors could be employed to the same effect?

https://docs.erpnext.com/docs/user/manual/en/stock/uom

I got you, but I’m trying to calculate volume (for export we need the given order sufficient for 1 container or not)

so what does not work with your script ?