---
title: "Codeunit 130440 Library - Random"
author: "JOP-AL"
url: https://jonas-paprotka.de/ref/codeunit/130440-library-random/
type: codeunit
id: 130440
name: "Library - Random"
app: "Application Test Library"
versions: "28-29"
build: 29.0.54011.55644
countries: "W1, DE, US"
source: "https://jonas-paprotka.de/ref/codeunit/130440-library-random/source/"
checked: 2026-11-20
changed: 2026-10-05
subject: "Microsoft Dynamics 365 Business Central"
license: "Metadata from Microsoft's symbol packages. AL source MIT, Copyright (c) Microsoft Corporation. Selection and wording © 2026 JOP-AL. https://jonas-paprotka.de/licenses/"
---

# Codeunit 130440 Library - Random

JOP-AL, https://jonas-paprotka.de/ref/codeunit/130440-library-random/

| | |
| --- | --- |
| App | Application Test Library |
| Versions | 28-29 |
| Minors | W1 28.0-29.0; DE 28.0-29.0; US 28.0-29.0, [every minor](https://jonas-paprotka.de/ref/codeunit/130440-library-random/editions.json) |
| SingleInstance | Yes |
| Source file | LibraryRandom.Codeunit.al |

## Procedures

| Name | Parameters | Returns | Access | Versions | Obsolete | Reason |
| --- | --- | --- | --- | --- | --- | --- |
| RandDec | (Range: Integer; Decimals: Integer) | Decimal | public | 28-29 | - | - |
| RandDecInRange | (Min: Integer; Max: Integer; Decimals: Integer) | Decimal | public | 28-29 | - | - |
| RandDecInDecimalRange | (Min: Decimal; Max: Decimal; Precision: Integer) | Decimal | public | 28-29 | - | - |
| RandInt | (Range: Integer) | Integer | public | 28-29 | - | - |
| RandIntInRange | (Min: Integer; Max: Integer) | Integer | public | 28-29 | - | - |
| RandDate | (Delta: Integer) | Date | public | 28-29 | - | - |
| RandDateFrom | (FromDate: Date; Range: Integer) | Date | public | 28-29 | - | - |
| RandDateFromInRange | (FromDate: Date; FromRange: Integer; ToRange: Integer) | Date | public | 28-29 | - | - |
| RandPrecision | () | Decimal | public | 28-29 | - | - |
| RandText | (Length: Integer) | Text | public | 28-29 | - | - |
| Init | () | Integer | public | 28-29 | - | - |
| SetSeed | (Val: Integer) | Integer | public | 28-29 | - | - |

## Source

Symbols: Microsoft.ApplicationTestLibrary.symbols.d852d5d2-a39d-4179-baeb-f99a19e32510, https://dynamicssmb2.pkgs.visualstudio.com/DynamicsBCPublicFeeds/_packaging/MSSymbols/nuget/v3/index.json, highest build per major on 2026-11-20.
AL source 29: https://github.com/microsoft/BCApps, MIT, releases/29.x at 4303e5e584d3aa5d9e98cbc615525a5396ad6ed7.

JOP-AL, 2026-11-20.
