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

Custom services development and testing

(0) ShareShare
ReportReport
Posted on by

Hello experts,

I am working on services and this is totally new for me,  before that I've never worked on services.

I needs your guidance to start my work.

Requirement:

External system sends SalesId to D365, D365 reads SalesId and performed "Sales order confirmation" against external system "SalesId"

POC

For the POC, I have refer few blogs and developed below code:

But as a part of testing, not able to proceed further -  I have created contract class (parm method: parmSalesId()) and but not able to understand how to get/read "SalesId" from external system

and how to use in contract class - parm method?

Requesting you kindly help on it or if possible show me services using small help.

 Development

1. Created Service Group

2. Services

3. Service class

Class XXX_SalesOrderService
{

[SysEntryPointAttribute()]
public str confirmSalesOrder(XXX_SOConfirmationContract  _so_contract)
{

SalesId salesId = _so_contract.parmSalesId();

// standard code for SO confirmation

}

4. Contract class

[DataContractAttribute]
class XXX_SOConfirmationContract
{

[DataMemberAttribute('SalesId')]
public list parmSalesId(ConfirmId _SalesId = SalesId)
{
SalesId = _SalesId;
return SalesId

I have the same question (0)
  • Martin Dráb Profile Picture
    237,948 Most Valuable Professional on at

    You won't read SalesId from the external system. You've created a web service that other system can call and when they do that, they must provide necessary parameters.

    When calling the custom service, you must decide which endpoint you'll use (SOAP or JSON-based). How you'll call the service depends on this decision.

    Your code shows that you know how to get SalesIds from the contract in the service method.

    By the way, SysEntryPointAttribute is deprecated - you can safely remove it.

  • Community Member Profile Picture
    on at

    Thanks Martin.

    Can you please provide some more detail on :

    "you must decide which endpoint you'll use (SOAP or JSON-based). How you'll call the service depends on this decision"

    and if external application wants to use our web services, what details and how I could share our web services with them?

    Please advice.

  • André Arnaud de Calavon Profile Picture
    301,069 Super User 2025 Season 2 on at

    Hi Priya,

    You can read about the strategies which are possible on the next page. With that information, you can decide what endpoint would be the best for your scenario: docs.microsoft.com/.../integration-overview

  • Verified answer
    Martin Dráb Profile Picture
    237,948 Most Valuable Professional on at

    Make sure you don't miss the page Custom service development.

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