Skip to main content
Post a question

Notifications

Community site session details

Community site session details

Session Id : B895O1W+isEDSga1ZgqmTQ

Custom Web Service in few steps D365FO

Sheikh Sohail Profile Picture Sheikh Sohail 6,125


Today, I will explain how to create basic custom Web Service in D365FO with few steps.



Step-1 Create a class with name of IntegrationService  and write a method get foo.

Reference screenshot

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

Step-2  Create Add new Service and associate your class with newly created service
Reference screenshot


Step-3 Class association with service.
Reference screenshot



Step-4 Add method of your class in service operations node those you want to expose.
 Reference screenshot

Step-5 Add Service group and associate your service with the service group.

Step-6 Set the service property Auto deploy= YES

Reference screenshot




Step-7 Perform Build & Sync and verify from browser..
Reference screenshot


Service URL 
https://usnconeboxax1aos.cloud.onebox.dynamics.com/api/services/[ServiceGroupName]/[ServiceName]/[MethodName]

Sample
https://usnconeboxax1aos.cloud.onebox.dynamics.com/api/services/IntegrationGroup/IntegrationService/getfoo


Follow this link to consume web service using POSTMAN


This was originally posted here.

Comments

*This post is locked for comments