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

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Answered

Web services in D365

(0) ShareShare
ReportReport
Posted on by

Hello guys,

Anyone can suggest me how's to create and usage of Web Services in D365 F&O ? I search a couple topics but either it's in partial, not clear, or it's turn out to be D365 CRM. 

Please if there is a very simple one with the 'chronological' / orderly manner how to create and what setting needed and of course how to use it.

Any good blog for a beginner to try ?

Much appreciate should there is such.

Thanks,

I have the same question (0)
  • Verified answer
    WillWU Profile Picture
    22,361 on at

    Hi WWwong,

    Please see:

    community.dynamics.com/.../custom-web-service-in-few-steps-d365fo

    Hope this helps.

  • Suggested answer
    Sergei Minozhenko Profile Picture
    23,093 on at

    Hi WWwong,

    The steps are quite simple in this case

    1. Create a class with the service method

    2. Create a service element and assign class and method to this element

    3. Create a service group and add service to it.

    Step 1 is most complicated, especially if you need to use contract, list as input\output in your service

    As a reference, you can check docs.microsoft.com/.../using-custom-services and explore out of the box services (go to Service node in VS and check what classes are used and how they are designed).

  • Suggested answer
    Martin Dráb Profile Picture
    237,953 Most Valuable Professional on at

    Also note that custom service isn't the only type of web services you can use.

    If you want to work with entities (such as query customers or create orders), you can use OData services. There are many entities you can use out of the box, and if you need an extra one, you'll simply create a public data entity and it'll automatically become available through the OData web service.

  • Community Member Profile Picture
    on at

    Hi Sergei,

    Noted, I will try, but first I tried the one from Will (since it is look very simple).

    So, here is the step:

    1. create the class :

    class IntegrationServices
    
    {
         public str getFoo()
    
        {
    
           return "Hello World";
    
       }
    
    }

    2. Create Service, named it "HelloWorld",  fill in property Class for "IntegrationServices", Add New Service operation and fill in property method "GetFoo"

    3. Create new Service Group, named it SRVGHelloWorld, make it AutoDeploy to "Yes". Add New Service, named it Hello with property Service to "HelloWorld"

    pastedimage1597214585646v1.png

    4. Build and sync

    Then go to my browser, call it : https://....myappsURL/api/services/SRVGHelloWorld/HelloWorld/GetFoo

    But why it says Page cannot be found. Seems like it still not recognize it, since if I call again without the Service Group, it listed all the available Service Group but this new one.

    Kindly advice,

    Thanks

  • Martin Dráb Profile Picture
    237,953 Most Valuable Professional on at

    Did you build you solution?

    By the way, please use Insert > Insert Code (in the rich formatting view) to paste source code.

  • Sergei Minozhenko Profile Picture
    23,093 on at

    Hi WWwong,

    You missed the link in the end of the article about Postman d365technext.blogspot.com/2018/07/dynamics-365-finance-operation-webapi.html. You can't call services from the browser directly, but you can get WSDL reference for soap version

    https://...myappsURL/soap/services/SRVGHelloWorld?wsdl

  • Community Member Profile Picture
    on at

    Hi Sergei,

    Noted, so there is a step that I need to register my App in Azure portal. This thing I'm not sure I have the authority.

    Anyway, thanks.

  • WillWU Profile Picture
    22,361 on at

    Hi WWwong,

    And please make sure that the external name of service should be typed correctly.

  • WillWU Profile Picture
    22,361 on at

    Hi WWwong,

    As you mentioned, the custom services support standard OAuth 2.0 authentication.

    The application must be registered in AAD before any clients can communicate with the services.

    docs.microsoft.com/.../services-home-page

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…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > Finance | Project Operations, Human Resources, AX, GP, SL

#1
Martin Dráb Profile Picture

Martin Dráb 559 Most Valuable Professional

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 464 Super User 2025 Season 2

#3
Sohaib Cheema Profile Picture

Sohaib Cheema 250 User Group Leader

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans