web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

Creating 50000 records of entity

(0) ShareShare
ReportReport
Posted on by 335

Hello
I have a requirement to create 50000 records in an entity by passing some fields value.
I had used C# plugin for that but the plugin only execute for 2 minutes.

Please give me some ideas for the above task.
Thanks in Advance

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    Thomas David Dayman Profile Picture
    11,323 on at

    Hi Nishkarsh,

    I would recommend using SSIS and KingswaySoft adaptor. www.kingswaysoft.com/.../download

    You can put your values in SQL Server and import them into CRM using the adaptor

    Let me know if you want me to expand on anything.

  • Suggested answer
    Community Member Profile Picture
    on at

    If this is a one off operation I would suggest that you create a console application and creates the entities via SDK calls or do an Excel import.

  • Suggested answer
    Macoy Profile Picture
    275 on at

    Hi,

    You can use KingswaySoft SSIS for this job. Create records with SQL or Extract the records from your source Instance(if you have source environment) to a file then load it to a staging DB in SQL before loading to target CRM instance.

    Hope this gives you an idea.

  • CU27040925-8 Profile Picture
    2 on at
    / Create Bulk Record in MS Dynamics 365 CRM CRM through c#
    public static void BulkCreate(IOrganizationService service, List<Entity> EntityList)
            {
               // Batch size
               int batchSize = 100; // Adjust the batch size as needed
               for (int i = 0; i < EntityList.Count; i += batchSize)
               {
                   var batchRecords = EntityList.Skip(i).Take(batchSize).ToList();
                   ExecuteMultipleRequest Request = new ExecuteMultipleRequest();
                   Request.Settings = new ExecuteMultipleSettings();
                   Request.Settings.ContinueOnError = true;
                   Request.Settings.ReturnResponses = true;
                   Request.Requests = new OrganizationRequestCollection();
                   foreach (var record in batchRecords)
                   {
                       var CreateRequest = new CreateRequest();
                       CreateRequest.Target = record;
                       Request.Requests.Add(CreateRequest);
                   }
                   ExecuteMultipleResponse response = (ExecuteMultipleResponse)service.Execute(Request);
                   foreach (var responseItem in response.Responses)
                   {
                       if (responseItem.Fault != null)
                       {
                           Console.WriteLine($"Error creating record: {responseItem.Fault.Message}");
                       }
                       else
                       {
                           Console.WriteLine($"Record created successfully. ID: {((CreateResponse)responseItem.Response).id}");
                       }
                   }
               }
            }
     
     
     
    You can use this code to create 50k record in MS Dynamics CRM 365 in 5 minutes
     

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

Season of Sharing Community Challenge Launch!

Jump in, show your community spirit, and win prizes!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

Congratulations to the May Top 10 Community Leaders

These are the community rock stars!

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans