---
id: object/codeunit/5142
type: object
title: Codeunit 5142 "Contoso Utilities"
summary: Codeunit 5142 "Contoso Utilities" in ContosoCoffeeDemoDataset (Microsoft.DemoTool.Helpers). 8 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: 8ba28d4c05686ccbfc15ecdc1010b1b937cb34cd66ec8d25fc89753932092f7c
evidence:
  - kind: code
    url: https://github.com/microsoft/BCApps/blob/ea08af5ef2d6a9b5c5af4a029288abbe2c883220/src/Apps/W1/ContosoCoffeeDemoDataset/app/DemoTool/Contoso%20Helpers/ContosoUtilities.Codeunit.al
    title: src/Apps/W1/ContosoCoffeeDemoDataset/app/DemoTool/Contoso Helpers/ContosoUtilities.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: 5142
name: Contoso Utilities
namespace: Microsoft.DemoTool.Helpers
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: 8
  events: 0
  subscribers: 0
relations:
  out: 0
  referenced_by: 0
  pages: 0
  extended_by: 0
  event_subscribers: 0
  calls: 2
  called_by: 55
  implements: 0
---

# Codeunit 5142 "Contoso Utilities"

> Codeunit 5142 "Contoso Utilities" in ContosoCoffeeDemoDataset (Microsoft.DemoTool.Helpers). 8 public procedures. Introduced in BC29, still in BC30.

ContosoCoffeeDemoDataset · Microsoft.DemoTool.Helpers · BC29-30 · [source at ea08af5e](https://github.com/microsoft/BCApps/blob/ea08af5ef2d6a9b5c5af4a029288abbe2c883220/src/Apps/W1/ContosoCoffeeDemoDataset/app/DemoTool/Contoso%20Helpers/ContosoUtilities.Codeunit.al) · facts from BC29

## Procedures

- `AdjustPrice(UnitPrice: Decimal): Decimal` (internal)
- `AdjustDate(OriginalDate: Date): Date`
- `GetFileStream(var TempBlob: Codeunit "Temp Blob"; FileBase64: Text)`
- `EmptyPicture(): Codeunit "Temp Blob"`
- `RandBarcodeInt(): Integer` (internal)
- `GetDefaultBatchNameLbl(): Code[10]`
- `GetTempBlobFromFile(FilePath: Text): Codeunit "Temp Blob"`
- `InsertBLOBFromFile(FilePath: Text; FileName: Text): Code[50]`

## 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 4100 "Temp Blob"](../codeunit/4100.md) (1 call: `GetFileStream → CreateOutStream`)
- [Codeunit 4110 "Base64 Convert"](../codeunit/4110.md) (1 call: `GetFileStream → FromBase64`)

## Called by

- [Codeunit 4770 "Create Mfg Item"](../codeunit/4770.md) (8 calls: `CreateBOMAndRoutingItems → AdjustPrice`, `CreateBOMAndRoutingItems → EmptyPicture`, `CreateFlushingItems → AdjustPrice`, …)
- [Codeunit 4785 "Manufacturing Media"](../codeunit/4785.md) (8 calls: `GetAirPotDuoPicture → GetFileStream`, `GetAirPotLargePicture → GetFileStream`, `GetAirPotLiteWhitePicture → GetFileStream`, …)
- [Codeunit 5172 "Employee Media"](../codeunit/5172.md) (7 calls: `GetDesignerPicture → GetFileStream`, `GetInventoryManagerPicture → GetFileStream`, `GetManagingDirectorPicture → GetFileStream`, …)
- [Codeunit 5418 "Create Sales Document"](../codeunit/5418.md) (4 calls: `CreateOpenSalesDocuments → AdjustDate`, `CreatePaidLateSalesDocuments → AdjustDate`, `CreateSalesDocumentsForReconciliation → AdjustDate`, …)
- [Codeunit 5420 "Create Purchase Document"](../codeunit/5420.md) (4 calls: `CreateOpenedPurchaseInvoices → AdjustDate`, `CreatePurchaseInvoicesForReconciliation → AdjustDate`, `CreatePurchaseOrders → AdjustDate`, …)
- [Codeunit 4793 "Create Whse Item"](../codeunit/4793.md) (3 calls: `CreateItemReferences → RandBarcodeInt`, `CreateWhseItems → AdjustPrice`, `CreateWhseItems → RandBarcodeInt`)
- [Codeunit 4796 "Create Whse Orders"](../codeunit/4796.md) (3 calls: `CreateOrdersScenarioSilver → AdjustDate`, `CreateOrdersScenarioWhite → AdjustDate`, `CreateOrdersScenarioWhite → AdjustPrice`)
- [Codeunit 4798 "Warehouse Media"](../codeunit/4798.md) (3 calls: `GetWRB1000Picture → GetFileStream`, `GetWRB1001Picture → GetFileStream`, `GetWRB1002Picture → GetFileStream`)
- [Codeunit 5685 "Create Media Repository"](../codeunit/5685.md) (3 calls: `CreateLatePaymentModel → InsertBLOBFromFile`, `CreateO3565Template → InsertBLOBFromFile`, `ImportInvoicingEmailMedia → InsertBLOBFromFile`)
- [Codeunit 4775 "Create Mfg Capacity"](../codeunit/4775.md) (2 calls: `CreateWorkAndMachineCenters → AdjustDate`, `CreateWorkAndMachineCenters → AdjustPrice`)
- [Codeunit 4779 "Create Mfg Item Jnl Line"](../codeunit/4779.md) (2 calls: `OnRun → AdjustDate`, `OnRun → GetDefaultBatchNameLbl`)
- [Codeunit 5104 "Create Svc Item"](../codeunit/5104.md) (2 calls: `CreateItems → AdjustPrice`, `CreateItems → EmptyPicture`)
- [Codeunit 5110 "Create Svc Item Jnl Lines"](../codeunit/5110.md) (2 calls: `OnRun → AdjustDate`, `OnRun → GetDefaultBatchNameLbl`)
- [Codeunit 5118 "Create Fixed Asset"](../codeunit/5118.md) (2 calls: `CreateFADepreciationBookForAssets → AdjustDate`, `CreateFixedAsset → AdjustDate`)
- [Codeunit 5189 "Create Job Item Jnl Lines"](../codeunit/5189.md) (2 calls: `OnRun → AdjustDate`, `OnRun → GetDefaultBatchNameLbl`)
- [Codeunit 5192 "Create Job Item"](../codeunit/5192.md) (2 calls: `OnRun → AdjustPrice`, `OnRun → EmptyPicture`)
- [Codeunit 5222 "Create Sustainability Entry"](../codeunit/5222.md) (2 calls: `CreateLinesForWaterWasteBatch → AdjustDate`, `CreateLinesToPost → AdjustDate`)
- [Codeunit 5258 "Create Bank Acc. Rec."](../codeunit/5258.md) (2 calls: `CreateBankAccountReconciliation → AdjustDate`, `CreatePaymentReconciliationJournal → AdjustDate`)
- [Codeunit 5259 "Create Sust. Purchase"](../codeunit/5259.md) (2 calls: `CreatePurchaseInvoiceWithGL → AdjustDate`, `CreatePurchaseInvoiceWithItem → AdjustDate`)
- [Codeunit 5538 "Create Item Jnl Line"](../codeunit/5538.md) (2 calls: `OnRun → AdjustDate`, `OnRun → GetDefaultBatchNameLbl`)
- [Codeunit 5692 "Create Extended Sales Document"](../codeunit/5692.md) (2 calls: `CreateOpenSalesDocuments → AdjustDate`, `CreateSalesInvoicesToPost → AdjustDate`)
- [Codeunit 4765 "Create Mfg Item Journal Setup"](../codeunit/4765.md) (1 call: `OnRun → GetDefaultBatchNameLbl`)
- [Codeunit 4772 "Create Mfg Prod. Routing"](../codeunit/4772.md) (1 call: `Scenario5Subcontracting → AdjustPrice`)
- [Codeunit 5105 "Create Svc Resource"](../codeunit/5105.md) (1 call: `CreateResources → AdjustPrice`)
- [Codeunit 5107 "Create Svc Sales Orders"](../codeunit/5107.md) (1 call: `OnRun → AdjustDate`)
- [Codeunit 5108 "Service Media"](../codeunit/5108.md) (1 call: `GetMachine1Picture → GetFileStream`)
- [Codeunit 5123 "Create FA Maint. Registration"](../codeunit/5123.md) (1 call: `OnRun → AdjustDate`)
- [Codeunit 5154 "Create Svc Item Journal"](../codeunit/5154.md) (1 call: `OnRun → GetDefaultBatchNameLbl`)
- [Codeunit 5155 "Create FA Insurance"](../codeunit/5155.md) (1 call: `OnRun → AdjustDate`)
- [Codeunit 5166 "Create Employee Relative"](../codeunit/5166.md) (1 call: `OnRun → AdjustDate`)
- [Codeunit 5176 "Create Employee Absence"](../codeunit/5176.md) (1 call: `OnRun → AdjustDate`)
- [Codeunit 5191 "Create Job Resource"](../codeunit/5191.md) (1 call: `OnRun → AdjustPrice`)
- [Codeunit 5198 "Create Job Item Journal"](../codeunit/5198.md) (1 call: `OnRun → GetDefaultBatchNameLbl`)
- [Codeunit 5209 "Create Customer"](../codeunit/5209.md) (1 call: `OnRun → GetTempBlobFromFile`)
- [Codeunit 5211 "Jobs Media"](../codeunit/5211.md) (1 call: `GetMachine1Picture → GetFileStream`)
- [Codeunit 5221 "Create Sustainability Journal"](../codeunit/5221.md) (1 call: `OnRun → AdjustDate`)
- [Codeunit 5225 "Create Accounting Period"](../codeunit/5225.md) (1 call: `OnRun → AdjustDate`)
- [Codeunit 5237 "Create Resource"](../codeunit/5237.md) (1 call: `OnRun → AdjustDate`)
- [Codeunit 5240 "Create Statistical Journal"](../codeunit/5240.md) (1 call: `OnRun → AdjustDate`)
- [Codeunit 5241 "Create Statistical Entry"](../codeunit/5241.md) (1 call: `CreateLinesToPost → AdjustDate`)
- [Codeunit 5242 "Create Emission Fee"](../codeunit/5242.md) (1 call: `OnRun → AdjustDate`)
- [Codeunit 5249 "Create Sust. Goal"](../codeunit/5249.md) (1 call: `OnRun → AdjustDate`)
- [Codeunit 5254 "Create Sust. Item"](../codeunit/5254.md) (1 call: `OnRun → EmptyPicture`)
- [Codeunit 5256 "Create Sust. Vendor"](../codeunit/5256.md) (1 call: `OnRun → EmptyPicture`)
- [Codeunit 5297 "Create Acc. Schedule Chart"](../codeunit/5297.md) (1 call: `OnRun → AdjustDate`)
- [Codeunit 5381 "Create Transfer Orders"](../codeunit/5381.md) (1 call: `OnRun → AdjustDate`)
- [Codeunit 5416 "Create Salesperson/Purchaser"](../codeunit/5416.md) (1 call: `OnRun → EmptyPicture`)
- [Codeunit 5421 "Create Gen. Journal Line"](../codeunit/5421.md) (1 call: `OnRun → AdjustDate`)
- [Codeunit 5442 "Create Campaign"](../codeunit/5442.md) (1 call: `OnRun → AdjustDate`)
- [Codeunit 5536 "Create Analysis View"](../codeunit/5536.md) (1 call: `OnRun → AdjustDate`)
- and 5 more: data/code/graph/29/calls.json

## 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: "Contoso Utilities")`, then `bcatlas_get_procedure_body` or `bcatlas_get_neighbors` on the returned id.
