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

Last Purchase Invoice Number in Vendor Card

(1) ShareShare
ReportReport
Posted on by 15

Is it possible to have a field with the last purchase invoice number in a vendor's card? Moreover, if it is possible, is it updated automatically? If both are possible, how are these done please? Thanks in advance. 

  • Martinaaaaa Profile Picture
    15 on at
    RE: Last Purchase Invoice Number in Vendor Card

    I was looking for more of a built in functionality as opposed to customizing it with code. Thanks anyways though!

  • Suggested answer
    YUN ZHU Profile Picture
    85,819 Super User 2025 Season 1 on at
    RE: Last Purchase Invoice Number in Vendor Card

    Hi, you can try to use flowfield.

    For example,

    tableextension 50100 MyExtension5 extends Vendor
    {
        fields
        {
            field(50100; "Last Purchase Invoice Number"; Code[20])
            {
                FieldClass = FlowField;
                CalcFormula = max("Purch. Inv. Header"."No." where("Buy-from Vendor No." = field("No.")));
            }
        }
    }
    
    pageextension 50111 MyExtension5 extends "Vendor Card"
    {
        layout
        {
            addafter(Name)
            {
                field("Last Purchase Invoice Number"; Rec."Last Purchase Invoice Number")
                {
                    ApplicationArea = All;
                }
            }
        }
    }

    pastedimage1653608424423v1.png

    Click the Number.

    pastedimage1653608437894v2.png

    Hope this will help.

    Thanks.

    ZHU

  • Suggested answer
    Vinita_Kas Profile Picture
    336 on at
    RE: Last Purchase Invoice Number in Vendor Card

    Hi

    The requirement is not correct

    Since there can be multiple open invoices for the vendor so which one should be shown?

    Ideally, you should look at the balance field on the vendor card as shown below in step 1 and it would then open all the invoices as shown in step 2 

    pastedimage1653602785014v3.png

    Regards

    Vinita

  • Suggested answer
    MahGah Profile Picture
    15,445 on at
    RE: Last Purchase Invoice Number in Vendor Card

    Hi 

    Nothing out of the box. You need development for that. But in Vendor card you have Buy From Vendor History and from there you can click on invoice and see the last number. 

    pastedimage1653589754728v1.png

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

Ramesh Kumar – Community Spotlight

We are honored to recognize Ramesh Kumar as our July 2025 Community…

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

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

#1
Sohail Ahmed Profile Picture

Sohail Ahmed 2,655

#2
Mansi Soni Profile Picture

Mansi Soni 1,574

#3
YUN ZHU Profile Picture

YUN ZHU 1,453 Super User 2025 Season 1

Featured topics

Product updates

Dynamics 365 release plans