Posts

Showing posts from December, 2020

Downloading Notes Attachments Using Paging in Dynamics CRM

  Introduction This article is about downloading note attachments from Dynamics 365. If you have a large number of records from where you want to download an attachment, you can face different issues such as a timeout, slow downloading, etc. In this article, I am going to provide a sample code that you can use to download attachments from a small set of data.   Details To download an attachment from Dynamics, we can query the notes entity. We can control data retrieval based on the query, but sometimes, our source dataset is more than 5000 so we need to use paging cookies in our retrieve multiple queries. While query our entity data if we have used the paging cookie feature, the result contains a value for the paging cookie which we can use to fetch the next pages.   However, even while fetching default 5000 records, depending on the notes attachment size, it can talk lot of time to query. Recently, while working a similar requirement, I faced an issue while fetching reco...