web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

Develop Dynamics 365 WebService

(0) ShareShare
ReportReport
Posted on by

Hello, I have the requirement to develop a webservice for dynamics 365.

This system needs two web services. One will be hosted in CRM and consumed by a Portal and the other one will be hosted in the Portal and consumed by CRM. There will be a two way communication in this system and they can send data at any time.

On my side I have to gather information from various entities and produce an xml file (or wsdl in this case) to then send across the Portal web service.

I can retrieve all the data that I need from CRM using plugins but I am stuck as I have no experience on how to develop web services. My questions are:

  • How do I create a web service that sits on dynamics and sends information to the Portal? (I have no experience with web services)
  • As mentioned above, I have a plugin that is currently used to retrieve information from the entities. Will I need to integrate this code with the service or the two can sit separately and talk to each other?

I hope this gives enough information to (at least) have an idea of what I am trying to achieve.

Thanks for you help and patience.

*This post is locked for comments

I have the same question (0)
  • Verified answer
    ashlega Profile Picture
    34,477 on at
    RE: Develop Dynamics 365 WebService

    Hi Christian,

     just to be clear, you cannot develop services "in" Dynamics. You can develop an external web service that would connect to Dynamics using the SDK.. In terms of configuring a connection etc it would not be that different from this console application example:

    msdn.microsoft.com/.../jj602970.aspx

     You may not actually need that additional service since Dynamics does have a web service (which, again, you can easily connect to from the portal - see that example above)

     If you wanted to send data to the portal web service from Dynamics, you might add that functionality to the plugins.

     As for the existing plugins, it depends.. but you'll likely have to move that code to wherever you will end up using it (portal web service? External web service?)

     Hope this helps.

    PS. Btw, that "portal" part depends on which portal you are going to use since you actually can't develop server-side code for the Dynamics customer portals.. But, of course, since it's using Dynamics as a "data source", it goes back to developing a web service for Dynamics then. If, on the other hand, it's a custom-made portal, then it's not a problem at all.

  • PranavShroti Profile Picture
    4,510 on at
    RE: Develop Dynamics 365 WebService

    Hi Christian,

    1) Dynamics offers built in web services which other application can consume.
    Two most popular types are :
    --Web API
    --Organization service

    You will get more information here.
    msdn.microsoft.com/.../mt608128.aspx

    2) You can call portal web services hosted on Azure so that you can push data to portal.
    refer this community link: community.dynamics.com/.../227343

    Regards,
    Pranav
    Mark answer as Verified if this helps.

  • Community Member Profile Picture
    on at
    RE: Develop Dynamics 365 WebService

    ashlega

    Hi Alex, Thank you for your quick reply.

    I have not mentioned that I am not developing the portal (it is being developed by an external company) hence why I asked if the additional service was needed.

    I had a reply from them asking me to develop a dummy service (which I believe its purpose is to mimic what their portal does) and do the testing on my side because their development has not started yet.

    So given these information I guess I would need to develop the additional web service on my side, am I right?

  • Verified answer
    ashlega Profile Picture
    34,477 on at
    RE: Develop Dynamics 365 WebService

    Hi Christian,

      in that case I'd probably develop a separate web service to only give them access to what they need (sure you can give them access to the Dynamics web service, but you would have to share user account information etc.. yet that might be a bit too much power/flexibility). Only expose the functionality they need in that web service, and, then, use Dynamics SDK to connect that web service to Dynamics.

  • Community Member Profile Picture
    on at
    RE: Develop Dynamics 365 WebService

    ashlega

    That clarifies a lot thank you for you time. Would you be able to point me to the right direction on what type of service should I develop? (MVC, Web API, etc)

    I am also assuming that the logic used in the plugin will be re-used in the web service as they are both written in C# right?

  • Verified answer
    ashlega Profile Picture
    34,477 on at
    RE: Develop Dynamics 365 WebService

    Hi Christian,

     you can reuse the logic, sure. Actually, if you have some plugins that are running on create/update/delete, they will still be running even if you do those operations through a web service, so you may not have to replicate some of that logic in the service.

     MVC vs WebAPI.. that's not so much a Dynamics question (in short, it does not matter from the Dynamics standpoint.. you will still be using the same SDK methods/code to access Dynamics from that service). This may help, though:

    www.dotnettricks.com/.../difference-between-aspnet-mvc-and-aspnet-web-api

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Abhilash Warrier – Community Spotlight

We are honored to recognize Abhilash Warrier as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
HR-09070029-0 Profile Picture

HR-09070029-0 2

#1
UllrSki Profile Picture

UllrSki 2

#3
ED-30091530-0 Profile Picture

ED-30091530-0 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans