Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics CRM (Archived)

Create more than 1000 entities?

Posted on by 150

Hi,

Problem:

Need to create more than 1000 entities as a batch job. Running this as a Plugin fails due to the restriction of the batch size and the time out. 
Changing the batch size is not an option.

Can anyone recommend a different architecture for this action?

Use of Azure Logic Apps?
Use of Azure API Apps?

Please forward me to any documentation/tutorials.
Thanks!

Regards
Kjetil

*This post is locked for comments

  • ashlega Profile Picture
    ashlega 34,475 on at
    RE: Create more than 1000 entities?

    Glad it helped. Thanks for marking as an answer.

  • RE: Create more than 1000 entities?

    Thanks!

    Your idee using a "container/holder" entity work fine. I had to rewrite some of the code, due to the use of ExecuteMultipleRequest which are only allowed to be running two at the same time.

    :Kjetil

  • Verified answer
    ashlega Profile Picture
    ashlega 34,475 on at
    RE: Create more than 1000 entities?

    It depends on how bad it is.. I think CRM should be able to create 1000 records in under 2 minutes if there are no plugins/workflows.. But, eventually, there is still a limit - if it does not fail at 1000, it will fail at 2K.. or 3K.. the only guaranteed solution, then, would be to move that into an external process(in which case you can just have a console app connecting to CRM) and schedule it somewhere

    If you have other plugins/workflows slowing down the "create" operation, you might try to set up a secondary entity and use it as a data holder. In your original plugin, you might create 1000 records for that entity and "hold" all the data there, and, then, you might have an async plugin for that secondary entity which would run for that secondary entity and would actually create the record you need (and delete the "holder" after that)

  • RE: Create more than 1000 entities?

    Yes, I already use ExecuteMultipleRequest and I use Actions as a process in Dynamics to decrease the execution time of the Plugin.

    But the problem is the amount of entities which exceeds 1000.

    :Kjetil

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Create more than 1000 entities?

    Hi Kjetil,

    have you tried this ?

    msdn.microsoft.com/.../jj863631.aspx

    Regards,

  • RE: Create more than 1000 entities?

    This is a recurring operation

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Create more than 1000 entities?

    Hi,

    Is this a one time operation or a recurring operation ?

    Jithesh

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,269 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,198 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans