Search code examples
asp.net-mvcasp.net-coredynamics-crm-2011scaffoldingauto-generate

How to crud with crm in asp.net core mvc?


I have a Dynamics crm 2011 on-premise. I want to create update delete and read crm's data in asp.net core mvc application. I should add xrm sdk packages to my project's packages. I have not found any lib and package of xrm for asp.net core mvc web application. I know how do crud in asp.net mvc web application. Can you help me how i can do crud with crm in asp.net core mvc?

I have a crm web service and i should connect to it and do crud with it . I also should make possibilities that user could change crm's data and fields and tables's structure. I want to connect to crm and get metadata of it and then create model of it and then create scaffold (controller and view) of model. I can't do this (scaffold via code) in asp.net mvc web application .net framework .


Solution

  • It's possible to interact with the Dynamics CRM webservice w/o any 3rd party tools, just using SOAP/Webservice requests. Unless you want to directly create extension that run within Dynamics CRM (such as Apps, or extending Dynamics CRMs functionality), you don't need the XrmSDK at all.

    So, just use download the WCF Connected services from Visual studio 2017 Marketplace.

    Then generate WCF classes and proxy services from the CRM's service url. for on-premises it's http[s]://ServerName/OrganizationName/XRMServices/2011/Organization.svc.

    For Dynamics CRM Online see the docs

    For Microsoft Dynamics 365 (online)

    Use the following URLsto access the organization service ( SOAPendpoint): https://OrganizationName.api.crm.dynamics.com/XrmServices/2011/Organization.svc (North America) https://OrganizationName.api.crm2.dynamics.com/XrmServices/2011/Organization.svc (South America) https://OrganizationName.api.crm3.dynamics.com/XrmServices/2011/Organization.svc (Canada) https://OrganizationName.api.crm4.dynamics.com/XrmServices/2011/Organization.svc (EMEA) https://OrganizationName.api.crm5.dynamics.com/XrmServices/2011/Organization.svc (APAC) https://OrganizationName.api.crm6.dynamics.com/XrmServices/2011/Organization.svc (Oceania) https://OrganizationName.api.crm7.dynamics.com/XrmServices/2011/Organization.svc (Japan) https://OrganizationName.api.crm8.dynamics.com/XrmServices/2011/Organization.svc (India) https://OrganizationName.api.crm9.dynamics.com/XrmServices/2011/Organization.svc (North America 2) https://OrganizationName.api.crm11.dynamics.com/XrmServices/2011/Organization.svc (United Kingdom)