Home > OS >  How to go about it: sync/export data for Accounts from Microsoft Dynamics 365 CRM and show it in a 3
How to go about it: sync/export data for Accounts from Microsoft Dynamics 365 CRM and show it in a 3

Time:02-24

I'm trying to get data from Microsoft Dynamics 365 CRM, specifically the Accounts and their data to show it in my own web app that I will build using ASP.NET MVC and C#.

How would I go about doing this so that my web app will instantly be updated when the data in CRM changes? I find it difficult enough navigating through the Dynamics platform already, thanks Microsoft.

The app would work like this:

  1. When run, the app would get the initial data, and establish a real-time connection with WS to the CRM to get further new data/changes.
  2. the app will display this data in a table.
  3. When a change is detected, the web app should update without refreshing the page.
  4. individual table rows will be colored according to number of contacts and if they lack any contact data.

I've started researching webhooks with MS CRM, but it seems Visual Basic is crapping out on me a lot and I cant get the tools to work properly . I think that I have to establish a connection somehow with WebSocket to the CRM, I just don't know which technologies to use and what plugins there are, seeing I'm new to ASP.NET MVC and C#.

Anyway, I just don't know where to start. Could someone send me in the right direction? I would greatly appreciate it!

CodePudding user response:

You can access the data inside a Dynamics 365 / Power Apps instance (also known as Dynamics CRM or Dynamics 365 CE) using the APIs provided by the system.

You can leverage these APIs using the SDK provided by Microsoft (this one https://www.nuget.org/packages/Microsoft.CrmSdk.XrmTooling.CoreAssembly/ or this one in preview for .NET Core https://www.nuget.org/packages/Microsoft.PowerPlatform.Dataverse.Client/) or by calling the API directly inside the language of your choice.

Usually you need to deal with CRUD events, and the APIs can do that. In your question you mention "the web app should update without refreshing the page" so you will need to take a look at webhooks (here a doc page https://docs.microsoft.com/en-us/dynamics365/customerengagement/on-premises/developer/use-webhooks) handle them in your application and see if they fit your requirements.

CodePudding user response:

Thank you for the help! It did help out a bit, however, I have found this tutorial from Microsoft that accomplishes the same thing overall. If it helps anyone else:

https://docs.microsoft.com/en-us/powerapps/developer/data-platform/walkthrough-blazor-webassembly-single-tenant

  • Related