web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Small and medium business | Business Central, N...
Suggested Answer

Pulling Specific Vendor smartlist

(0) ShareShare
ReportReport
Posted on by 5

HI!

We are trying to figure out how to pull a list of our most used vendors for the last year to make labels for filing purposes.

We would like to pull vendors that have been paid more than 3 times or had more than 3 invoices in the last year but we cannot seem to figure out how. We cannot do by $ amount as this varies too much. When doing by invoices paid YTD greater than 3 it is pulling vendors with only 2 invoices... not sure if it is pulling from Jan-Jan or our fiscal year. Looking for other options to filter by.

Help is appreciated.

Thank you,

I have the same question (0)
  • Suggested answer
    keoma Profile Picture
    32,729 on at

    you may need a new report on base of tables vendor and "vendor ledger entry", filtered by document type=invoice.

    create a report with dataitem Vendor, add the needed fields

    add following code in trigger onprereport:

    //variables
    vle : record . vendor ledger entry
    startDate: date
    NoOfInv: integer // default value 3, set in request page

    startDate := CALCDATE('-1Y',TODAY);
    vend.FINDFIRST;
    REPEAT
      vle.SETRANGE("Posting Date",startDate,TODAY);
      vle.SETRANGE("Document Type",vle."Document Type"::Payment);
      vle.SETRANGE("Applies-to Doc. Type",vle."Applies-to Doc. Type"::Invoice);
      vle.SETRANGE("Vendor No.",vend."No.");
      vle.SETFILTER(Amount,'>%1',0);
      i   := vle.COUNT;
      IF i >= NoOfInv THEN BEGIN
        Vendor.COPY(vend);
        vend.CALCFIELDS(Balance);
        Vendor."Budgeted Amount" := vend.Balance; // save the balance
        Vendor.INSERT;
      END;
    UNTIL vend.NEXT = 0;

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

Season of Sharing Community Challenge Launch!

Jump in, show your community spirit, and win prizes!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

Congratulations to the May Top 10 Community Leaders

These are the community rock stars!

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

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 1,687 Super User 2026 Season 1

#2
YUN ZHU Profile Picture

YUN ZHU 1,041 Super User 2026 Season 1

#3
Grigorios Mavrogeorgis Profile Picture

Grigorios Mavrogeorgis 974 Super User 2026 Season 1

Last 30 days Overall leaderboard

Featured topics

Microsoft Training Manuals

Product updates

Dynamics 365 release plans