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

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Business Central forum

Data migration in BC.

(0) ShareShare
ReportReport
Posted on by 220

Hello experts,

I am struggling with data upload in BC via excel.

I am uploading master data (item, customer, vendor) through excel using config package. Now problem is I have 10k of items , 3k of customers and 1k of vendors, and when I am uploading it through excel using config package it taking 9-10 hours and after uploading data if I got errors in data than I need to repeat all steps again. Meanwhile if session get timed out then whole process need to repeat again.

So I already wasted my two days in this uploading process.

Do we have any faster way in BC to upload this kind of heavy files?

Regards

SuD

 

  • Suggested answer
    Stefano Demiliani Profile Picture
    37,172 Most Valuable Professional on at

    I agree, RapidStart is not the best way for massive data loading. Better to use web services or APIs.

  • Sudarshan khandal Profile Picture
    220 on at

    Hey Stefano,

    Thanks for your prompt revert.

    I have gone through your blog on simplenova regarding Data Migration, I read there those three ways you mentioned in that blog.

    But what if we have data in excel files only. Web service and API's works if we have data in any existing system.

  • Suggested answer
    Stefano Demiliani Profile Picture
    37,172 Most Valuable Professional on at

    You can parse the Excel file and then load data in D365BC by using WS or APIs. I’ve a sample on my blog on how to do that by using an Azure Function that parse a CSV for example.

  • Verified answer
    Sudarshan khandal Profile Picture
    220 on at

    Oh great !!

    I will go through that blog post.

    Thanks

  • Sudarshan khandal Profile Picture
    220 on at

    Hi Stefeno,

    I have gone through that blog.

    But here is a query of mine, how are you parsing CSV file through that piece of code?

  • Suggested answer
    Stefano Demiliani Profile Picture
    37,172 Most Valuable Professional on at

    Here is the function in that piece of code that performs the CSV parsing:

    private static DataTable CreateDataTable(string filename)

           {

               DataTable csvData = new DataTable();

               csvData.Columns.Add("OrderNo");

               csvData.Columns.Add("CustomerNo");

               csvData.Columns.Add("ItemNo");

               csvData.Columns.Add("Quantity");

               using (var rd = new StreamReader(filename))

               {

                   while (!rd.EndOfStream)

                   {

                       var fields = rd.ReadLine().Split(',');

                       csvData.Rows.Add(fields[0], fields[1], fields[2], fields[3]);

                   }

               }

               return csvData;

           }

    It receives a filename as input, creates a DataTable object, reads the file and loads the data into this datatable.

    Then you can loop through DataTable's rows and call a D365BC web service or APIs to pass the data.

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

November Spotlight Star - Khushbu Rajvi

Congratulations to a top community star!

Forum Structure Changes Coming on 11/8!

In our never-ending quest to help the Dynamics 365 Community members get answers faster …

Dynamics 365 Community Platform update – Oct 28

Welcome to the next edition of the Community Platform Update. This is a status …

Leaderboard > Business Central

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans