# DBAmp: ‘EXCEEDED\_ID\_LIMIT: EntityDefinition does not support queryMore(), use LIMIT to restrict the results to a single batch’ when executing a SELECT \* FROM \[(linked\_server\_name)\_Fields\] system view

**URL:** <https://community.cdata.com/t/dbamp-exceeded-id-limit-entitydefinition-does-not-support-querymore-use-limit-to-restrict-the-results-to-a-single-batch-when-executing-a-select-from-linked-server-name-fields-system-view/553>\
**Category:** Editions\
**Tags:** article, salesforce, dbamp, system\_view\
**Created:** [December 6, 2023, 10:30pm UTC](https://community.cdata.com/t/dbamp-exceeded-id-limit-entitydefinition-does-not-support-querymore-use-limit-to-restrict-the-results-to-a-single-batch-when-executing-a-select-from-linked-server-name-fields-system-view/553 "2023-12-06T22:30:47Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ismete\_M](https://avatars.discourse-cdn.com/v4/letter/i/f0a364/32.png) [@Ismete\_M](https://community.cdata.com/u/Ismete_M)\
**Post date:** [December 6, 2023, 10:30pm UTC](https://community.cdata.com/t/dbamp-exceeded-id-limit-entitydefinition-does-not-support-querymore-use-limit-to-restrict-the-results-to-a-single-batch-when-executing-a-select-from-linked-server-name-fields-system-view/553/1 "2023-12-06T22:30:48Z")

</div>

Getting the following error after executing: SELECT \* FROM [\<linked\_server\_name\>\_Fields]:

“EXCEEDED\_ID\_LIMIT: EntityDefinition does not support queryMore(), use LIMIT to restrict the results to a single batch”

This error means exactly what it states. An API request to the EntityDefinition table is made. When getting results from the table, the query() method is executed from the API. It has a limit on how many records the result query object can contain. If the limit is exceeded, the queryMore() method is called by the API to get the next batch of data. But this specific Salesforce Object (EntityDefinition) does not support the queryMore() method, which then results in the above error returned from the Salesforce API.

In pre-V22 versions of DBAmp, one way to get around this restriction would be if the \_FieldsPerObject system view created by the stored procedure SF\_CreateSysViews, is used for each object individually.

For versions V22 and higher, a stored procedure, SF\_SysSFFieldsTable is created to resolve this issue with the following syntax:

_EXECUTE SF\_SysSFFieldsTable ‘linked\_server\_name’_

To read more about EnitityDefinition: [EntityDefinition | Tooling API | Salesforce Developers](https://developer.salesforce.com/docs/atlas.en-us.234.0.api_tooling.meta/api_tooling/tooling_api_objects_entitydefinition.htm#:~:text=Supported%20SOAP%20Calls-,query()%2C%20search(),-Supported%20REST%20HTTP)

To read more about the query() method: [query() | SOAP API Developer Guide | Salesforce Developers](https://developer.salesforce.com/docs/atlas.en-us.234.0.api.meta/api/sforce_api_calls_query.htm#:~:text=If%20the%20query%20results%20exceed%20500%20rows%2C%20then%20the%20client%20application%20uses%20the%20queryMore()%20call%20and%20a%20server-side%20cursor%20to%20retrieve%20additional%20rows%20in%20500-row%20chunks)

Please reach out to [support@cdata.com](mailto:support@cdata.com) if you have any questions.
