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

Notifications

Announcements

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
    25,396 Most Valuable Professional on at
  • Suggested answer
    Khushbu Rajvi. Profile Picture
    21,048 Super User 2025 Season 2 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

News and Announcements

Season of Giving Solutions is Here!

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 1,651

#2
Khushbu Rajvi. Profile Picture

Khushbu Rajvi. 808 Super User 2025 Season 2

#3
YUN ZHU Profile Picture

YUN ZHU 718 Super User 2025 Season 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans