Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Retrieve more than 5K records from Dynamics 365/CRM #83

Open
joseRdzP opened this issue Jun 26, 2019 · 10 comments
Open

Retrieve more than 5K records from Dynamics 365/CRM #83

joseRdzP opened this issue Jun 26, 2019 · 10 comments

Comments

@joseRdzP
Copy link

Hi,

I'm trying to figure out how to retrieve more that 5k records from Dynamics 365/CRM, looks like the GetList method has a variable named "nextLink" but I can't access it from its properties. Is there any way to retrieve more than 5000 records from CRM? Is there an example to use the paging on this API? Thanks!

@joseRdzP
Copy link
Author

@davidyack

@davidyack
Copy link
Owner

GetList follows the next links and will return you the entire set of data that matches your criteria

@joseRdzP
Copy link
Author

But for example, if I try to retrieve all the records from a CRM entity without any filter on the query, by using FetchXml it gets only 5000 records, how can I access the nextLink property or how can I get the remaining records?

@joseRdzP
Copy link
Author

image

@davidyack
Copy link
Owner

Ah yes, Fetchxml with Get does not page today that is high on the list to add - look at #49 as it has some example code that might help you in the mean time.

@joseRdzP
Copy link
Author

@davidyack I've implemented my own code in my Azure Function based on code from the "GetList" method and looks like it's working as expected, however I'll do more testing on that. Thank you very much for your suggestion! Do you have an ETA for the date of the new release of the API? Will the new version contain the fix to retrieve more than 5000 records? Thank you!

@davidyack
Copy link
Owner

@joseRdzP I don't have an ETA depends on when anyone has free time to look at it, if you have a modified version of GetList you'd like to post here that has it working might speed up things :)

@mohsinonxrm
Copy link

@joseRdzP , I'll be opening a pull request in a couple of days (already coded, going to test a bit more) and submitting the changes for @davidyack to review and merge.

@priyanksster
Copy link

@mohsinonxrm Thanks for updating the code but I am getting the Malformed XML in the paging cookie error. I have created an issue at #117
Any idea, what could be wrong? There are more than 5K records.

@mohsinonxrm
Copy link

@priyanksster , I haven't looked at this in a while. What's your use case? Can you post a gist of your code? Is it as easy as pulling more than 5k records of say OOB account entity and I should be able to reproduce it?

Also, just FYI, MS has release their new DV Client that works with .NET Framework and dotnet core/dotnet 6, so if you want to transition to that, that's an option.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants