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

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

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

How to use Pagination in Custom Page API in Business central

(0) ShareShare
ReportReport
Posted on by 163
Hi All,

I am using On-Prem Business Central.

I have created one Custom Page API to fetch Items from Business Central, but its taking to much long time to get all the 20,000 item.
I want to use pagination in this API to fetch 15 record for each API call, but i never use or heard about pagination in Page API.

Does anyone have any idea about it. How we can implement it or if you have any code snip you can share.

Page API code :   This is my API where i want to use Pagination.
 
page 50119 "GetAllItemsDetail"
{
    PageType = API;
    APIVersion = 'v1.0';
    APIPublisher = 'QueryV1';
    APIGroup = 'QueryGroup';
    EntityName = 'Item';
    EntitySetName = 'Items';
    DelayedInsert = true;
    SourceTable = Item;
    layout
    {
        area(content)
        {
            repeater(Group)
            {
                field(Id; Rec.SystemId)
                {
                    Caption = 'Id';
                }
                field(ItemNo; Rec."No.")
                {
                    Caption = 'Item No';
                }
                field(Name; Rec.Description)
                {
                    Caption = 'Description';
                }
                field(Base_Unit_Price; Rec."Unit Price")
                {
                    Caption = 'Base Unit Price';
                }
            }
        }
    }
}
 
Thanks for your Help.
I have the same question (0)
  • Gerardo Rentería García Profile Picture
    26,080 Most Valuable Professional on at
  • Suggested answer
    Khushbu Rajvi. Profile Picture
    22,287 Super User 2026 Season 1 on at
    Hi,  you can use the built-in pagination support for Page APIs with the $top and $skip query parameters automatically handled by the API framework. you can make API calls using the standard pagination parameters:
    To retrieve the first 15 items:

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Meet the Microsoft Dynamics 365 Contact Center Champions

We are thrilled to have these Champions in our Community!

Congratulations to the March 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,122 Super User 2026 Season 1

#2
YUN ZHU Profile Picture

YUN ZHU 1,148 Super User 2026 Season 1

#3
Teagen Boll Profile Picture

Teagen Boll 733 Super User 2026 Season 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans