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

Notifications

Announcements

No record found.

Community site session details

Community site session details

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

Bypass total number of records retrieve using custom BC API

(0) ShareShare
ReportReport
Posted on by 24
Hi all,

I have created below query to retrieve item attribute values. In the query API, I get the items and the values that are connected to them. 
 
query 60116 /itemAttributeValue/
{
 
    QueryType = API;
    APIPublisher = 'ND';
    APIGroup = 'apigroup';
    APIVersion = 'v1.1';
    Caption = 'itemAttributeValue';
    EntityName = 'itemAttributeValue';
    EntitySetName = 'itemAttributeValue';
    elements
    {
        dataitem(Item; Item)
        {
            column(No_; /No./)
            {
            }
            column(Description; Description)
            {
            }
 
            dataitem(Item_Attribute_Value_Mapping; /Item Attribute Value Mapping/)
            {
                DataItemLink = /No./ = Item./No./;
 
                column(Item_Attribute_ID; /Item Attribute ID/)
                {
                }
                column(Item_Attribute_Value_ID; /Item Attribute Value ID/)
                {
                }
                dataitem(QueryElement6; /Item Attribute/)
                {
                    DataItemLink = ID = Item_Attribute_Value_Mapping./Item Attribute ID/;
                    column(Name; Name)
                    {
                    }
                    dataItem(Queryelement10; /Item Attribute Value/)
                    {
                        DataItemLink = /Attribute ID/ = Item_Attribute_Value_Mapping./Item Attribute ID/,
                        ID = Item_Attribute_Value_Mapping./Item Attribute Value ID/;
                        column(Value; Value)
                        {
                        }
                        column(Numeric_Value; /Numeric Value/)
                        {
                        }
                    }
                }
            }
 
        }
    }
}
 
However, we use item attribute values a lot in the company and this table has a total of 100.000+ records. This seems to be a problem when using API in Business Central. 
Has anyone a solution to bypass the record limits of 20.000 when using a API get request? 
I have the same question (0)
  • EGMX Profile Picture
    41 on at
    Hi Nick!
     
    I think the Microsoft OData connector should allow for over 20,000 rows to be downloaded as of earlier this year, at least for Excel and PowerBI, but I might be getting that wrong.
     
    If not, it might be possible to create a script that paginates through the data for you. Have it check if the response you get to your query has a "@odata.nextLink" field and if so, request it again and append the result, repeat until there's no more records.
     
    Hope this is of some help!
    - Edgar.
  • ND-30081126-0 Profile Picture
    24 on at
    Hi Edgar,

    I have seen some description about pagination. That should be the best shot, since MS will in make OData obsolete in the near future. 
    With OData, you are able to get more than 20.000 records. 

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

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 2,606

#2
YUN ZHU Profile Picture

YUN ZHU 931 Super User 2025 Season 2

#3
Jainam M. Kothari Profile Picture

Jainam M. Kothari 773 Super User 2025 Season 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans