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...
Answered

TopNumberOfRows not restricting data

(1) ShareShare
ReportReport
Posted on by 5

Hi

I have a simple query using 'TopNumberOfRows, but it doesnt seem to restrict the data, can anyone spot where I am going wrong?

pastedimage1675094818656v2.png

I have the same question (0)
  • Suggested answer
    IB-29041624-0 Profile Picture
    1,191 Moderator on at

    I think you are missing the new rows parameter as it is documented here:

    learn.microsoft.com/.../queryinstance-topnumberofrows-method

  • Verified answer
    YUN ZHU Profile Picture
    101,848 Super User 2026 Season 1 on at

    Hi, I just tested it and there is indeed a problem.

    pastedimage1675125849281v1.png

    pastedimage1675125893288v2.png

    Have you tested the standard Query below? I suspect it's a standard bug if this is also problematic.

    pastedimage1675125918986v3.png

    Hope this helps.

    Thanks.

    ZHU

  • CD MILHO Profile Picture
    5 on at

    Thanks, I copied the example in the attached link except for the ID and the number of rows which I lowered to 2 but it returned all the data

  • CD MILHO Profile Picture
    5 on at

    Thanks, I tested the example you gave and it is also problematic so presumably a bug.

  • Carsten W. Profile Picture
    5 on at

    I have the same problem.

    With Business Central OnPrem Version

    DE Business Central 20.0 (Platform 20.0.37114.38150 + Application 20.0.37253.38230)

    data is not limited.

    If I run the same code on Cloud Version:

    DE Business Central 22.0 (Plattform 22.0.56306.0 + Anwendung 22.0.54157.54644)

    data is limited as expected.

    So it could be a bug.

    Any suggestions what to do know?

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 April Top 10 Community Leaders

These are the community rock stars!

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

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 2,386 Super User 2026 Season 1

#2
YUN ZHU Profile Picture

YUN ZHU 1,774 Super User 2026 Season 1

#3
AndrewThomas81 Profile Picture

AndrewThomas81 1,515

Last 30 days Overall leaderboard

Featured topics

Microsoft Training Manuals

Product updates

Dynamics 365 release plans