Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics NAV (Archived)

NAV2016 Do not insert record while type is not selected

Posted on by Microsoft Employee

Hello everyone,

I'm having a little trouble. I have a page and subpage in the picture below:

59ac8353361af45715f3a83c10c2a4ea.png

Problem is that i would like firstly to select "invoice type" which has 3 values: " ", "one", "two".

And only after that, programming code would gather needed serial number and paste it in "serial no." field.

Is it possible or you can offer some other alternates?

What i have tried:

firstly choose invoice type (ofcourse it creates empty record) and then select serial no by hand, which causes message "do you want to rename it?" This is bad.

secondly I tried use only 2 values of invoice type, but by that whenever i click on expand window of invoice types, default serial no fills in.

Now i have set Serial no as a "NotBlank - Yes", which now on new entry after expanding invoice type, gives error "serial no. must be filled in. Enter a value", but after selecting invoice type i can manualy select serial no from assist button, which isnt fun to have.

*This post is locked for comments

  • Suggested answer
    Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: NAV2016 Do not insert record while type is not selected

    Totaly forgot about Primary keys.. Thank you Mohana!

  • Verified answer
    Mohana Yadav Profile Picture
    Mohana Yadav 59,139 Super User 2024 Season 2 on at
    RE: NAV2016 Do not insert record while type is not selected

    why cant you have Invoice type also part of Primary key and place it before serial no. and set delayedInsert property of page to yes.

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,280 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,214 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans