Connecting D365 with C# client.

Hello Guys,

We have come across many situation where we need to integrate D365 with third party. For example we have to create a website which is going to handle some entities of the CRM or we need to create some EXE. or Window services which will update CRM records from the background.

Sometimes we want to create a WEB Api which will integrate D365 CRM with another UI. There are so many scenarios where we need to connect CRM with other applications. 

This blog will explain how you can connect D365 with any C# client whether it is Console, Windows or Web.

To achieve this we need Visual Studio. you can use any version of the Visual Studio.
So now we will implement it step by step.

Step 1:- Start Visual Studio.

Step 2:- Go to File->New -> Project -> Other Project -> Visual Studio Solutions. Specify the Name of the Project and click on OK.


Step 3:- Now go to the solution explorer. Right click on "D365Connector" -> Add new project -> Select Class Library -> Specify the Name "D365Connector.Domain" -> Ok.


Step 3:- Rename the "Class1" .cs file to "CRMHelper" .cs. Now right click on "D365Connector.Domain" project and click on "Manage Nuget Package". In the browse tab search for "crmsdk". and install below package.

Step 4:- Now write below code in CRMHelper.cs file.


Above code will be used for connecting D365. Now we will create one Console application and check whether it is working on not.

Step 5:- Right click on "D365Connector" Solution -> Add new project -> select Console application. Specify the name "D365Connector.ConsoleUI".


Now we require CRM Soap service Url for connecting the CRM. you can get this url from Settings -> Customization -> Developer resource.


Step 6:- Now copy the url and implement below code in Program.cs file and run the application.


In this way you can make a connection between D365 and C# Client. In our upcoming blog i will show you how you can retrieve data from the D365 Organization.

Hope it helps...

Comments

Post a Comment

Popular posts from this blog

Read Only Sub Grid & Editable Sub grid in Dynamics 365

Understanding Sales Process in D365.

Understanding Business Unit in Dynamics 365.