Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics NAV (Archived)

sales invoice sub form

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

hi

for sales invoice sub form:

1. The user can select only the Item and the blank value in the type Column. How can I restrict this will entering the data entry fro sales invoice sub form

2. How can I show the invoice header posting date  message box, if users select yes, then post the invoice..

Thanks

*This post is locked for comments

  • Verified answer
    Mohana Yadav Profile Picture
    Mohana Yadav 60,157 Super User 2025 Season 1 on at
    RE: sales invoice sub form

    1. High Level code is

    if "Document Type" = "Document Type"::Invoice then

     if NOT (Type in [Type::"",Type::Item]) THEN

        ERROR('error message');

    2. You need to write code like

    if "Document Type" = "Document Type"::Invoice then

     IF NOT CONFIRM(

       'Posting Date is %1.. Do you want to contineu?',FALSE,

       "Posting Date")

     THEN

       EXIT;

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: sales invoice sub form

    Thanks

    1. Yes, can you pls help with the code, it is better, if it on the form level

    it should accept item and blank in the type column

    2. yes

  • Suggested answer
    Mohana Yadav Profile Picture
    Mohana Yadav 60,157 Super User 2025 Season 1 on at
    RE: sales invoice sub form

    1. You can write code in Table 37 - Sales Line Type OnValidate trigger to show errror message when user has select other option while Documnet Type is Invoice.

    2. When you click on Post button in Sales invoice, you want to show a conform message of Posting date and if user presses yes then you want to post the invoice, Am I right?

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

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Vahid Ghafarpour – Community Spotlight

We are excited to recognize Vahid Ghafarpour as our February 2025 Community…

Tip: Become a User Group leader!

Join the ranks of valued community UG leaders

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 292,516 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 231,321 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans