Skip to main content

Notifications

Small and medium business | Business Central, N...
Suggested answer

Using pagination on Business Central API

(0) ShareShare
ReportReport
Posted on by 35

Hi 

I am on Business Central Online.

I have a GET API that retrieves the number of Contacts in Business Central.

It works but there is a hard 20,000 limit for the number of contacts in the system.

I believe that there should be some pagination logic that I can use on the API to get the remaining records after the 20,000.  

Any assistance or URL will be greatly appreciated. 

Eng Siong Tan

  • Suggested answer
    Predator75 Profile Picture
    Predator75 35 on at
    RE: Using pagination on Business Central API

    Yes. Thank you very much.

    The odata.nextlink works and it is alot more user friendly. Or at least it is more what we would expect from Microsoft.

  • Suggested answer
    Stefano Demiliani Profile Picture
    Stefano Demiliani 37,162 Most Valuable Professional on at
    RE: Using pagination on Business Central API

    Business Central API follows the odata standard for paging, and when there are more pages of data to retrieve the @odata.nextlink property is included in the response which you can use to create another request to get the next page of information. This pattern can be repeated until the @odata.nextlink is null or missing to get to the end of the dataset.

  • Suggested answer
    Nitin Verma Profile Picture
    Nitin Verma 21,091 Super User 2024 Season 1 on at
    RE: Using pagination on Business Central API

    Hi Predator75 ,

    If you can use Configuration package, it will also export the data out.

    See if that works for you.

  • Suggested answer
    Predator75 Profile Picture
    Predator75 35 on at
    RE: Using pagination on Business Central API

    Thank you. And Yes. It works for the EC0*, EC1*, EC2*.

    This solves my current Contact issue.

    The reason why I asked is that I have an Item Master with records more than 10K.

    Which I also need to export out.

  • Suggested answer
    Nitin Verma Profile Picture
    Nitin Verma 21,091 Super User 2024 Season 1 on at
    RE: Using pagination on Business Central API

    Hi Predator75 ,

    Did you try below filters in your api?

    ?$filter=No_ ='@*EC0*'

  • Predator75 Profile Picture
    Predator75 35 on at
    RE: Using pagination on Business Central API

    Hi Nitin

    Great idea for things with sequential numbers.

    EC0*

    EC1*

    EC2*

    However, this does not solve the issue for master records without a sequential primary no.

    May I know if you are aware of pagination or batching solutions?

    Thanks

  • Suggested answer
    Nitin Verma Profile Picture
    Nitin Verma 21,091 Super User 2024 Season 1 on at
    RE: Using pagination on Business Central API

    Hi Predator75 ,

    Can you try with the filter in the API so that you can get all your records partially?

    Thanks.

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

Announcing Category Subscriptions!

Quick Links

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Verified Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,359 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,370 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans