Skip to main content

Notifications

Announcements

No record found.

Business Central forum
Suggested answer

field should only accept number

editSubscribe (1) ShareShare
ReportReport
Posted on by
 
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?
 
 
Categories:
  • Suggested answer
    Mohamed Amine Mahmoudi Profile Picture
    Mohamed Amine Mahmoudi User Group Leader on at
    field should only accept number
    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
    Mohana Yadav Profile Picture
    Mohana Yadav Super User on at

Helpful resources

Quick Links

New Blog Features Released!

Check out the new community blog features for viewers and authors…

Setting Up Knowledge Sources for Copilot…

Look at how configuring a comprehensive knowledge base is crucial…

Demystifying Copilot with Georg Glantschnig…

Industry experts answer burning questions directly from our amazing Community…

Featured topics

Product updates

Dynamics 365 release plans