---
id: post/yzhums-com/68658
type: post
title: "Dynamics 365 Business Central: How to set the minimum and maximum numeric values ​​for a field"
summary: "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."
tier: community
language: en
tags:
  - field validation
  - data constraints
  - al development
  - table fields
  - page controls
system: development
review:
  state: reviewed
  by: opus
  at: "2026-10-26T06:41:41.779Z"
  flags: []
generated:
  at: "2026-10-29T21:55:00.611Z"
  pipeline: 0.2.0
  prompts:
    extract-post: 1
  input_hash: b97f7d833a480053b4cc7779f9cfea1f6b7cf87eac1fd003e5691310e1cd9510
evidence:
  - kind: blog
    url: https://yzhums.com/68658/
    title: "Dynamics 365 Business Central: How to set the minimum and maximum numeric values ​​for a field"
    date: "2025-10-30"
    commit: null
    t: null
    quote: null
links:
  learn: []
  objects:
    - object/table/23
  features: []
  topics: []
  localizations: []
  videos: []
  posts: []
  guidelines: []
  related:
    - to: post/yzhums-com/65762
      title: "Dynamics 365 Business Central: How to quickly check whether the user has write (Insert, Delete, and Modify) permission for the table in AL"
      label: possibly related
      why: both name Table 23 "Vendor"
      by: code
    - to: post/aardvarklabs-blog/2866
      title: Importing XML into Business Central with AL
      label: possibly related
      why: both name Table 23 "Vendor"
      by: code
    - to: post/aardvarklabs-blog/3348
      title: Step-by-Step Guide to Secure Business Central Agent Implementations in AL
      label: possibly related
      why: both name Table 23 "Vendor"
      by: code
    - to: post/wingate365-com/https-blog-wingate365-com-2026-04-trying-out-github-copilot-agent-for-html--9cac8e5838
      title: Trying out GitHub Copilot Agent for a Functional Task?
      label: possibly related
      why: both name Table 23 "Vendor"
      by: code
    - to: post/aardvarklabs-blog/3928
      title: Understanding Business Central’s Format Address Codeunit
      label: possibly related
      why: both name Table 23 "Vendor"
      by: code
    - to: video/mXvKs6X1DNk
      title: "What's new: Cross-environment Master Data Management (2026 release wave 2)"
      label: possibly related
      why: both name Table 23 "Vendor"
      by: code
    - to: video/fIOnGEARkKs
      title: "What's New: Dataverse & Dynamics 365 App Integration (2023 release wave 2) Part 1"
      label: possibly related
      why: both name Table 23 "Vendor"
      by: code
    - to: video/YTA8c2XyTX4
      title: "What's New: Dataverse & Dynamics 365 App Integration (2023 release wave 2) Part 2"
      label: possibly related
      why: both name Table 23 "Vendor"
      by: code
    - to: video/hcu7T3qLdDA
      title: "What's New: The Danish Bookkeeping Act (2024 release wave 1)"
      label: possibly related
      why: both name Table 23 "Vendor"
      by: code
post_id: "68658"
source_id: yzhums-com
source_name: Dynamics 365 Lab - Yun Zhu
url: https://yzhums.com/68658/
published_at: "2025-10-30T01:48:45.000Z"
author: Yun Zhu
full_text: false
words: 526
quotes: []
code_objects_mentioned:
  - table Vendor
systems:
  - development
versions_mentioned: []
cautions:
  - kind: gotcha
    quote: If a field is updated through application code, then the MinValue/MaxValue property is not validated.
    objects: []
    events: []
    versions: []
preview:
  embeddable: true
  frame_url: null
  image: https://yzhums.com/wp-content/uploads/2025/10/image-211.png
  image_alt: null
  image_w: null
  image_h: null
  site_name: Dynamics 365 Lab
  favicon: https://yzhums.com/wp-content/uploads/2020/08/cropped-logo-3-32x32.png
  probed_at: "2026-10-26T06:12:39.229Z"
---

# Dynamics 365 Business Central: How to set the minimum and maximum numeric values ​​for a field

[Read the post](https://yzhums.com/68658/) · Dynamics 365 Lab - Yun Zhu (Yun Zhu, MVP) · 2025-10-30 · 526 words · tier community · reviewed (checked by Opus)

> 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.

## 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.

- [table 23 "Vendor"](../../objects/table/23.md)

## 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](../../posts/yzhums-com/65762.md) — possibly related: both name Table 23 "Vendor"
- [Importing XML into Business Central with AL](../../posts/aardvarklabs-blog/2866.md) — possibly related: both name Table 23 "Vendor"
- [Step-by-Step Guide to Secure Business Central Agent Implementations in AL](../../posts/aardvarklabs-blog/3348.md) — possibly related: both name Table 23 "Vendor"
- [Trying out GitHub Copilot Agent for a Functional Task?](../../posts/wingate365-com/https-blog-wingate365-com-2026-04-trying-out-github-copilot-agent-for-html--9cac8e5838.md) — possibly related: both name Table 23 "Vendor"
- [Understanding Business Central’s Format Address Codeunit](../../posts/aardvarklabs-blog/3928.md) — possibly related: both name Table 23 "Vendor"
- [What's new: Cross-environment Master Data Management (2026 release wave 2)](../../videos/mXvKs6X1DNk.md) — possibly related: both name Table 23 "Vendor"
- [What's New: Dataverse & Dynamics 365 App Integration (2023 release wave 2) Part 1](../../videos/fIOnGEARkKs.md) — possibly related: both name Table 23 "Vendor"
- [What's New: Dataverse & Dynamics 365 App Integration (2023 release wave 2) Part 2](../../videos/YTA8c2XyTX4.md) — possibly related: both name Table 23 "Vendor"
- [What's New: The Danish Bookkeeping Act (2024 release wave 1)](../../videos/hcu7T3qLdDA.md) — 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.
