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 :
Microsoft Dynamics CRM (Archived)

Bulk fetch and Update entity record in Console app.

(0) ShareShare
ReportReport
Posted on by 5

Hi Experts,

Looking for the best approach to fetch and update the entities in bulk. Please suggest best approach to deal with this requirement, I am fetching List of Guids (~80K+) from an external database and want to update an entity in CRM by increment the counter integer field and setting one option set field. So far as per my understanding following are the possible approaches :

1. Using Early-bound classes - Querying the context in batches by passing 5K entity id at once and then looping through the entitylist and update the entity context with-in foreach loop.

2. Using QueryExpression - Passing the Guid ids in batch/page of 5k in query expression using ConditionOperator.In operator, retriveMultipleRespone and then loop through the entities and preparing the updaterequest collection and call executeMultiple again repeat the same for remaining pages.

Please suggest which approach will better or any-other approach to handle it more efficient way. Can we use multi-threading here ?

*This post is locked for comments

I have the same question (0)
  • Shubh_K Profile Picture
    80 on at

    Hi Experts,

    Looking for the best approach to fetch and update the entities in bulk. Please suggest best approach to deal with this requirement, I am fetching List of Guids (~80K+) from an external database and want to update an entity in CRM by increment the counter integer field and setting one option set field. So far as per my understanding following are the possible approaches : 

    1. Using Early-bound classes -  Querying the  context in batches by passing 5K entity id at once and then looping through the entitylist and update the entity context with-in foreach loop.

    2. Using QueryExpression - Passing the Guid ids in batch/page of 5k in query expression using ConditionOperator.In operator, retriveMultipleRespone and then loop through the entities and preparing the updaterequest collection and call executeMultiple again repeat the same for remaining pages.

    Please suggest which approach will better or any-other approach to handle it more efficient way. Can we use multi-threading here ?

    Thanks 

    Shubh

  • Shubh12 Profile Picture
    5 on at

    Hello Experts,

    Looking for the best approach to fetch and update the entities in bulk. Please suggest best approach to deal with this requirement, I am fetching List of Guids (~80K+) from an external database and want to update an entity in CRM by increment the counter integer field and setting one option set field. So far as per my understanding following are the possible approaches :

    1. Using Early-bound classes - Querying the context in batches by passing 5K entity id at once and then looping through the entitylist and update the entity context with-in foreach loop.

    2. Using QueryExpression - Passing the Guid ids in batch/page of 5k in query expression using ConditionOperator.In operator, retriveMultipleRespone and then loop through the entities and preparing the updaterequest collection and call executeMultiple again repeat the same for remaining pages.

    Please suggest which approach will better or any-other approach to handling it more efficient way. Can we use multi-threading here ?

  • Shubh_K Profile Picture
    80 on at

    Hi Experts,

    Looking for the best approach to fetch and update the entities in bulk. Please suggest best approach to deal with this requirement, I am fetching List of Guids (~80K+) from an external database and want to update an entity in CRM by increment the counter integer field and setting one option set field. So far as per my understanding following are the possible approaches : 

    1. Using Early-bound classes -  Querying the  context in batches by passing 5K entity id at once and then looping through the entitylist and update the entity context with-in foreach loop.

    2. Using QueryExpression - Passing the Guid ids in batch/page of 5k in query expression using ConditionOperator.In operator, retriveMultipleRespone and then loop through the entities and preparing the updaterequest collection and call executeMultiple again repeat the same for remaining pages.

    Please suggest which approach will better or any-other approach to handle it more efficient way. Can we use multi-threading here ?

    Thanks 

    Shubh

  • Suggested answer
    Community Member Profile Picture
    on at

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 > 🔒一 Microsoft Dynamics CRM (Archived)

#1
SA-08121319-0 Profile Picture

SA-08121319-0 4

#1
Calum MacFarlane Profile Picture

Calum MacFarlane 4

#3
Alex Fun Wei Jie Profile Picture

Alex Fun Wei Jie 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans