---
id: object/codeunit/5248
type: object
title: Codeunit 5248 "Create Unit of Measure"
summary: Codeunit 5248 "Create Unit of Measure" in ContosoCoffeeDemoDataset (Microsoft.DemoData.Foundation). 18 public procedures. Introduced in BC29, still in BC30.
tier: official
language: en
tags:
  - codeunit
  - contosocoffeedemodataset
versions:
  introduced: "29"
  last_changed: null
  deprecated: null
review:
  state: derived
  by: null
  at: null
  flags: []
generated:
  at: "2026-10-11T00:31:51.816Z"
  pipeline: 0.2.0
  prompts: {}
  input_hash: 6ffb42c82e1f8d971a91fe0065d337eed890687e217f4b1b56740deb5cfe41c7
evidence:
  - kind: code
    url: https://github.com/microsoft/BCApps/blob/ea08af5ef2d6a9b5c5af4a029288abbe2c883220/src/Apps/W1/ContosoCoffeeDemoDataset/app/DemoData/Foundation/1.Setup%20data/CreateUnitofMeasure.Codeunit.al
    title: src/Apps/W1/ContosoCoffeeDemoDataset/app/DemoData/Foundation/1.Setup data/CreateUnitofMeasure.Codeunit.al (releases/29.x)
    date: null
    commit: ea08af5ef2d6a9b5c5af4a029288abbe2c883220
    t: null
    quote: null
links:
  learn: []
  objects: []
  features: []
  topics: []
  localizations: []
  videos: []
  posts: []
  guidelines: []
object_type: codeunit
object_id: 5248
name: Create Unit of Measure
namespace: Microsoft.DemoData.Foundation
app: ContosoCoffeeDemoDataset
extends: null
first_version: "29"
last_version: "30"
present_in:
  - "29"
  - "30"
changed_in: []
source_major: "29"
obsolete: null
countries: []
ms_search_form_ids: []
counts:
  fields: 0
  procedures: 20
  events: 0
  subscribers: 0
relations:
  out: 0
  referenced_by: 0
  pages: 0
  extended_by: 0
  event_subscribers: 0
  calls: 2
  called_by: 15
  implements: 0
---

# Codeunit 5248 "Create Unit of Measure"

> Codeunit 5248 "Create Unit of Measure" in ContosoCoffeeDemoDataset (Microsoft.DemoData.Foundation). 18 public procedures. Introduced in BC29, still in BC30.

ContosoCoffeeDemoDataset · Microsoft.DemoData.Foundation · BC29-30 · [source at ea08af5e](https://github.com/microsoft/BCApps/blob/ea08af5ef2d6a9b5c5af4a029288abbe2c883220/src/Apps/W1/ContosoCoffeeDemoDataset/app/DemoData/Foundation/1.Setup%20data/CreateUnitofMeasure.Codeunit.al) · facts from BC29

## Procedures

- `Bag(): Code[10]`
- `Piece(): Code[10]`
- `Can(): Code[10]`
- `Set(): Code[10]`
- `Hour(): Code[10]`
- `Day(): Code[10]`
- `Box(): Code[10]`
- `Pallet(): Code[10]`
- `Pack(): Code[10]`
- `Miles(): Code[10]`
- `KM(): Code[10]`
- `KG(): Code[10]`
- `Gram(): Code[10]`
- `L(): Code[10]`
- `Ton(): Code[10]`
- `KWH(): Code[10]`
- `CM(): Code[10]`
- `M3(): Code[10]`

Plus 2 local procedures.

## Triggers

OnRun

## Calls

From the extracted call graph of BC29 (graphify-al on the snapshot checkout): calls whose target is known from a declared type or an `Object::"Name"` argument. Interface dispatch and calls through events are not counted, so the list is not complete.

- [Codeunit 5299 "Create Language"](../codeunit/5299.md) (3 calls: `CreateUnitOfMeasureTranslation → DAN`, `CreateUnitOfMeasureTranslation → DEU`, `CreateUnitOfMeasureTranslation → NLD`)
- [Codeunit 5129 "Contoso Unit of Measure"](../codeunit/5129.md) (2 calls: `CreateUnitOfMeasure → InsertUnitOfMeasure`, `CreateUnitOfMeasureTranslation → InsertUnitOfMeasureTranslation`)

## Called by

- [Codeunit 5222 "Create Sustainability Entry"](../codeunit/5222.md) (7 calls: `CreateLinesForWaterWasteBatch → KG`, `CreateLinesForWaterWasteBatch → M3`, `CreateLinesToPost → Day`, …)
- [Codeunit 5221 "Create Sustainability Journal"](../codeunit/5221.md) (6 calls: `CreateLinesForDefaultBatch → Day`, `CreateLinesForDefaultBatch → KM`, `CreateLinesForDefaultBatch → L`, …)
- [Codeunit 5537 "Create Item"](../codeunit/5537.md) (3 calls: `CreateItem → Piece`, `CreateItemUnitOfMeasure → Piece`, `CreateItemUnitOfMeasure → Set`)
- [Codeunit 5259 "Create Sust. Purchase"](../codeunit/5259.md) (2 calls: `CreatePurchaseInvoiceWithGL → Piece`, `CreatePurchaseInvoiceWithItem → Piece`)
- [Codeunit 5448 "Create Item Template"](../codeunit/5448.md) (2 calls: `OnRun → Hour`, `OnRun → Piece`)
- [Codeunit 5203 "Foundation Module"](../codeunit/5203.md) (1 call: `CreateSetupData → (object)`)
- [Codeunit 5212 "Create Sustainability Setup"](../codeunit/5212.md) (1 call: `CreateSetupTable → KG`)
- [Codeunit 5237 "Create Resource"](../codeunit/5237.md) (1 call: `OnRun → Hour`)
- [Codeunit 5249 "Create Sust. Goal"](../codeunit/5249.md) (1 call: `OnRun → KG`)
- [Codeunit 5254 "Create Sust. Item"](../codeunit/5254.md) (1 call: `OnRun → Piece`)
- [Codeunit 5277 "Create Sust. Responsibility"](../codeunit/5277.md) (1 call: `OnRun → M3`)
- [Codeunit 5393 "Create Item Attribute"](../codeunit/5393.md) (1 call: `OnRun → CM`)
- [Codeunit 5526 "Create BOM Component"](../codeunit/5526.md) (1 call: `OnRun → Piece`)
- [Codeunit 5577 "Create Nonstock Item"](../codeunit/5577.md) (1 call: `OnRun → Piece`)
- [Codeunit 5664 "Create Item Reference"](../codeunit/5664.md) (1 call: `OnRun → Piece`)

## Across versions

- Present in: BC29-30
- Changed (declaration) in: none

Source: AL metadata extracted from the code (names, ids, signatures, properties); no code bodies (D10).

## Ask your agent

Procedure bodies are not stored here (D10). The call sections above are our own, per object, from the BC29 call graph. For a procedure body or the calls of one procedure, ask bc-code-atlas (external, by Stefan Maron, MIT; default corpus w1-28), which the bc-observatory plugin connects: `bcatlas_resolve_node(object_type: "codeunit", object_name: "Create Unit of Measure")`, then `bcatlas_get_procedure_body` or `bcatlas_get_neighbors` on the returned id.
