Good day,
I have a task in my job working place to create a C# automatic tool that would be useful in uploading a large amount of files from the local disk to the Microsoft Dynamics 365 (on-premises) server. Once the tool uploads these files, it will be required for it to use a .CSV file, which has all the information on which files need to be attached as attachment files to certain Entity records. Currently I am a beginner and learner on how to create automatic tools for the CRM server. I have intermediate experience with C# but I am not very familiar with creating automatic tools for the CRM server. I want learn and understand the best ways in creating a automatic tool for the CRM server. I read online in the Microsoft documentation pages, stackoverflow, github and watched some tutorials which mentioned to use the Microsoft dynamics SDK for C#. I installed the SDK code samples on the local disk and the SDK assembly packages using Visual Studio Nuget tool in my Visual Studio project. However, all of these sources have information that is a bit confusing, sometimes misleading and gives me pressure in figure outing how to start writing code for this CRM tool. Currently I managed to create to login process part, which uses CrmClientService class and successfully logs into the server with the hardcoded connection string(Which later on will be located in a specific tool config file). However, I am currently stuck in understanding how to upload files to existing entity records. I've spent many days in learning and I am struggling a bit.
Could some of you give me some useful tips, recommendations or some information sources on how to start writing a simple mini tool, who will upload one file to a certain CRM server entity table record?
Once I understand how to accomplish this mini task, then it will be a nice start for me in understanding on how to upload large quantity of files that are located on the disk and required to be uploaded to the CRM server entity records as attachments. I only need to understand how to upload one simple file and I want do it in C# code.
Cheers,
Paulius