web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Small and medium business | Business Central, N...
Answered

field should only accept number

(1) ShareShare
ReportReport
Posted on by 4
 
I need to create a field that should only accept number. No texts / symbols are allowed.
 
What is the AL code for the same? What is the validation code?
 
 
I have the same question (0)
  • Verified answer
    Mohana Yadav Profile Picture
    61,005 Super User 2025 Season 2 on at
  • Suggested answer
    Mohamed Amine Mahmoudi Profile Picture
    26,449 Super User 2025 Season 2 on at
    Hi,
     
    you can create a field with type integer 
    field(10; number; Integer)
    if you want use Text or Code type you must use Numeric = true
    field(10; number; code[20])
    {
        Numeric = true;
        DataClassification = ToBeClassified;
    }
    Best regards,
    Mohamed Amine MAHMOUDI
  • Suggested answer
    YUN ZHU Profile Picture
    95,763 Super User 2025 Season 2 on at
    Hi, hope the following helps.
    Dynamics 365 Business Central: How to quickly check whether the value is numeric in AL
    Dynamics 365 Business Central: How to prohibit users from entering illegal characters such as emoji, Hiragana, kanji, etc.
     
     
    Thanks.
    ZHU

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > Small and medium business | Business Central, NAV, RMS

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 2,116

#2
Khushbu Rajvi. Profile Picture

Khushbu Rajvi. 764 Super User 2025 Season 2

#3
YUN ZHU Profile Picture

YUN ZHU 635 Super User 2025 Season 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans