Dynamics 365 Business Central: How to set the minimum and maximum numeric values for a field
Business Central offers two simple ways to limit numeric field values: the MinValue and MaxValue properties on table or page fields, or custom range checks in OnValidate triggers. The properties are only checked when values change through the UI, not when application code sets the field, and they cannot exclude the boundary values.

post Dynamics 365 Lab
Key points
- MinValue and MaxValue on a table or page field enforce an inclusive range and show a standard error when a value falls outside it.
- The property check runs for UI updates on pages or direct table edits, but not when application code assigns the value.
- Properties cannot express strict bounds such as only values above zero.
- An OnValidate trigger on the table field can hold custom range logic and raise an error; it runs before the page field OnValidate trigger.
AL objects mentioned
As named in the post. A name that matches one object page by exact type and name links to it; the others stay as named.
Possibly related
No source states these links: they share an object, a model read them, or a person found the same subject.
- Dynamics 365 Business Central: How to quickly check whether the user has write (Insert, Delete, and Modify) permission for the table in AL — possibly related: both name Table 23 “Vendor”
- Importing XML into Business Central with AL — possibly related: both name Table 23 “Vendor”
- Step-by-Step Guide to Secure Business Central Agent Implementations in AL — possibly related: both name Table 23 “Vendor”
- Trying out GitHub Copilot Agent for a Functional Task? — possibly related: both name Table 23 “Vendor”
- Understanding Business Central’s Format Address Codeunit — possibly related: both name Table 23 “Vendor”
- What’s new: Cross-environment Master Data Management (2026 release wave 2) — possibly related: both name Table 23 “Vendor”
- What’s New: Dataverse & Dynamics 365 App Integration (2023 release wave 2) Part 1 — possibly related: both name Table 23 “Vendor”
- What’s New: Dataverse & Dynamics 365 App Integration (2023 release wave 2) Part 2 — possibly related: both name Table 23 “Vendor”
- What’s New: The Danish Bookkeeping Act (2024 release wave 1) — possibly related: both name Table 23 “Vendor”
Heads up
- gotcha: “If a field is updated through application code, then the MinValue/MaxValue property is not validated.”
Context
- Features: MinValue Property, MaxValue Property, OnValidate Trigger, Field Validation
Source: Dynamics 365 Lab - Yun Zhu, community blog. Summary, key points and quotes are derived (CONTENT-NOTICE.md); read the original for the full text.