Skip to main content

Notifications

Microsoft Dynamics 365 | Integration, Dataverse...
Suggested answer

Import Data using plugin / C#

Posted on by 2,140

Hi all, 

I have some temp tables in database

And want to create records in Dynamics CRM using these data 

I am thinking of a Plugin 

Could you point me to some directions on how to manipulate data in C# and Plugins ?

Best Regards

Chris

  • Suggested answer
    Adrian Begovich Profile Picture
    Adrian Begovich 21,009 Super User 2024 Season 2 on at
    RE: Import Data using plugin / C#

    Hi Chris Mavroudis,

    You can create a C# console application to create an update records by calling create and update operations but I do not recommend this approach. It is a much better idea to use an ETL tool such as SQL Server Integration Services (SSIS) for this task.

  • Suggested answer
    Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Import Data using plugin / C#

    Hi Chris,

    If you have some data outside CRM, a plugin is not the way to go here. A plugin triggers when data is changed/created in CRM only.

    What I suggest is the following:

    1) Either export your temp tables in a nicely formatted excel sheet. Use the import wizard in Dynamics to map the columns in the excel sheet to your entities in Dynamics. For example, if the table consists of Employees, then it is good to map it o Contact entity in CRM. If your data is custom, then create a custom entity in CRM that has fields matching your excel sheet and then import the sheet.

    2) You can create a C# utility that uses Dynamics SDK, reads from your database and create records in CRM. Again, you would need an entity(s) in CRM to hold this data.

    thanks

    Omar

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,253 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,188 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Product updates

Dynamics 365 release plans