Skip to main content

Notifications

Announcements

No record found.

Small and medium business | Business Central, N...
Suggested answer

Validation Should not allow to insert record if a field is empty

Posted on by Microsoft Employee

I am new to Navision and I have a table name Custom Table and inside that table I have multiple fields, and I have a filed name Item No. I want to prevent the user from inserting records in the other fields if the Item No. field is empty is there a way of doing so ?

  • Suggested answer
    YUN ZHU Profile Picture
    YUN ZHU 73,565 Super User 2024 Season 2 on at
    RE: Validation Should not allow to insert record if a field is empty

    Hi, If my understanding is correct, you can add the following code in the OnValidate Trigger of other fields.

    For example,

     begin
            if Otherfields <> '' then
                if ItemNo = '' then
                    error('Error!!');
     end;
  • Suggested answer
    RockwithNav Profile Picture
    RockwithNav 6,562 on at
    RE: Validation Should not allow to insert record if a field is empty

    If Item No is the Primary Key then DelayedInsert Property of the Page will do your Job, Set this to No.

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,253 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,188 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans