R30425-10 StoreTransactionLine - Set Quantity Unit From Product Code

Code 30425-10
Entity Logistics.Inventory.StoreTransactionLines Entity
Name SetQuantityUnitFromProductCode
Attribute QuantityUnit
Layer Front-End
Events AttributeChanged(ProductCode)
Priority Normal
Modify YES
Applicable Legislations ALL // no condition needed
Action if (ProductCode != null) { Product = ProductCode.Product; QuantityUnit = ProductCode.CodingSystem.DefaultMeasurementUnit.IfNullThen(Product.MeasurementUnit); } else { QuantityUnit = Product.MeasurementUnit; }



Description When Product Code is changed, Quantity Unit should be set to the Product Code's Coding System's Default Measurement Unit. If the Default Measurement Unit is null, then Product's Measurement Unit is used.
Message
Version Introduced: 2020.1
Revocable YES

* For more information about the Business Rules Documentation Template and a short explanation of each column, see topic System Business Rules.