web
You’re offline. This is a read only version of the page.
close
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...
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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

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

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 2,577

#2
YUN ZHU Profile Picture

YUN ZHU 888 Super User 2025 Season 2

#3
Jainam M. Kothari Profile Picture

Jainam M. Kothari 778 Super User 2025 Season 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans