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

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
    27,194 Most Valuable Professional on at
  • Suggested answer
    Khushbu Rajvi. Profile Picture
    22,792 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

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 2,050 Super User 2026 Season 1

#2
YUN ZHU Profile Picture

YUN ZHU 1,441 Super User 2026 Season 1

#3
Grigorios Mavrogeorgis Profile Picture

Grigorios Mavrogeorgis 1,175 Super User 2026 Season 1

Last 30 days Overall leaderboard

Featured topics

Microsoft Training Manuals

Product updates

Dynamics 365 release plans