---
title: "Codeunit 5402 Unit of Measure Management"
author: "Jonas Paprotka"
url: https://jonas-paprotka.de/ref/codeunit/5402-unit-of-measure-management/
type: codeunit
id: 5402
name: "Unit of Measure Management"
app: "Base Application"
namespace: Microsoft.Foundation.UOM
versions: "17-28"
build: 28.5.54151.54365
source: "https://jonas-paprotka.de/ref/codeunit/5402-unit-of-measure-management/source/29/"
checked: 2026-09-20
subject: "Microsoft Dynamics 365 Business Central"
license: "Content © 2026 Jonas Paprotka. Quote freely with attribution and a link."
---

# Codeunit 5402 Unit of Measure Management

Jonas Paprotka, https://jonas-paprotka.de/ref/codeunit/5402-unit-of-measure-management/

| | |
| --- | --- |
| App | Base Application |
| Namespace | Microsoft.Foundation.UOM |
| Versions | 17-28 |
| Source file | Foundation/UOM/UnitofMeasureManagement.Codeunit.al |

## Procedures

| Name | Parameters | Returns | Access | Versions | Obsolete | Reason |
| --- | --- | --- | --- | --- | --- | --- |
| GetQtyPerUnitOfMeasure | (Record Item, Code[10]) | Decimal | public | 17-28 | - | - |
| GetResQtyPerUnitOfMeasure | (Record Resource, Code[10]) | Decimal | public | 17-28 | - | - |
| CalcBaseQty | (Decimal, Decimal) | Decimal | public | 17-28 | - | - |
| CalcBaseQty | (Code[20], Code[10], Code[10], Decimal, Decimal) | Decimal | public | 17-28 | - | - |
| CalcQtyFromBase | (Decimal, Decimal) | Decimal | public | 17-28 | - | - |
| CalcQtyFromBase | (Code[20], Code[10], Code[10], Decimal, Decimal) | Decimal | public | 17-28 | - | - |
| RoundQty | (Decimal) | Decimal | public | 17-28 | - | - |
| RoundToItemRndPrecision | (Decimal, Decimal) | Decimal | public | 17-28 | - | - |
| QtyRndPrecision | () | Decimal | public | 17-28 | - | - |
| CubageRndPrecision | () | Decimal | public | 17-28 | - | - |
| TimeRndPrecision | () | Decimal | public | 17-28 | - | - |
| WeightRndPrecision | () | Decimal | public | 17-28 | - | - |
| GetQtyRoundingPrecision | (Record Item, Code[10]) | Decimal | public | 19-28 | - | - |
| CalcBaseQty | (Code[20], Code[10], Code[10], Decimal, Decimal, Decimal, Text, Text, Text) | Decimal | public | 19-28 | - | - |
| RoundQty | (Decimal, Decimal) | Decimal | public | 19-28 | - | - |
| RoundAndValidateQty | (Decimal, Decimal, Text) | Decimal | public | 19-28 | - | - |
| ValidateQtyIsBalanced | (Decimal, Decimal, Decimal, Decimal, Decimal, Decimal) | - | public | 19-28 | - | - |
| CalcBaseQty | (Code[20], Code[10], Code[10], Decimal, Decimal, Decimal) | Decimal | public | 20-28 | - | - |
| RoundQty | (Decimal, Decimal, Text) | Decimal | public | 25-28 | - | - |

## Events

| Kind | Name | Parameters | Versions | Obsolete | Reason |
| --- | --- | --- | --- | --- | --- |
| Integration event | OnAfterCalcBaseQtyPerUnitOfMeasure | (Code[20], Code[10], Code[10], Decimal, Decimal, var Decimal) | 17-28 | - | - |
| Integration event | OnAfterCalcQtyFromBasePerUnitOfMeasure | (Code[20], Code[10], Code[10], Decimal, Decimal, var Decimal) | 17-28 | - | - |
| Integration event | OnBeforeGetQtyPerUnitOfMeasure | (Record Item, Code[10], var Decimal, var Boolean) | 17-28 | - | - |
| Integration event | OnBeforeGetResQtyPerUnitOfMeasure | (Record Resource, Code[10], var Decimal, var Boolean) | 17-28 | - | - |
| Integration event | OnBeforeCubageRndPrecision | (var Decimal) | 17-28 | - | - |
| Integration event | OnBeforeQtyRndPrecision | (var Decimal) | 17-28 | - | - |
| Integration event | OnBeforeTimeRndPrecision | (var Decimal) | 17-28 | - | - |
| Integration event | OnBeforeWeightRndPrecision | (var Decimal) | 17-28 | - | - |
| Integration event | OnAfterRoundToItemRndPrecision | (Decimal, Decimal, var Decimal) | 19-28 | - | - |

## Source

Symbols: Microsoft.BaseApplication.symbols.437dbf0e-84ff-417a-965d-ed2bb9650972, https://dynamicssmb2.pkgs.visualstudio.com/DynamicsBCPublicFeeds/_packaging/MSSymbols/nuget/v3/index.json, highest build per major on 2026-09-20.
AL source 29: https://github.com/microsoft/BCApps, MIT, releases/29.x at a66254c3b8b5bb1cea290dc8f9d097aec4381153.

Jonas Paprotka, 2026-09-20.
