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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Suggested Answer

Used of custom service in D365FO

(0) ShareShare
ReportReport
Posted on by 798

Hi team, I have gone through blogs and well understood the implementation of custom service. As mentioned “You should use a custom service when you need a third party to run code and return a response all in real time.

Could you please elaborate what it means? I mean real time. 

Please provide me an example to understand well.

thanks!

 

Categories:
I have the same question (0)
  • Suggested answer
    SajeedMullaji Profile Picture
    425 on at

    @CU10121822-0
     'real time' here means synchronous execution. The external system sends a request, pauses, and waits while D365 F&O processes it immediately and returns a response within the same HTTP connection — typically within seconds.

    The clearest way to understand it is by contrast

    PatternModeCaller Experience
    Custom ServiceSynchronous — real timeCaller waits and gets immediate response
    DIXF / Data EntitiesAsynchronous — stagedData goes to staging, batch job processes later
    Batch JobsAsynchronous — queuedRuns in background, caller does not wait

    Practical example — B2B e-commerce credit limit check:

    A corporate customer clicks Place Order on an external web store. The store needs to know immediately whether the customer has sufficient credit in D365 before confirming the order.

    Web store calls your D365 Custom Service endpoint passing customer ID and order total

    Custom service queries CustCreditMax and live balances instantly inside F&O

    D365 returns a JSON response within 1 second: {"Approved": true, "AvailableBalance": 15000.00}

    Web store shows order confirmation immediately

    If you used DIXF or a batch job here the customer would wait minutes staring at a loading screen while a background job picks up their file — that is why custom services exist for interactive, time-sensitive touchpoints.

    if it helps , mark as verified

  • Suggested answer
    Subra Profile Picture
    2,028 Super User 2026 Season 2 on at

    Hi @CU10121822-0 

    Let say if you want to create a sales order from external mobile application. you will send a request and D365FO will process the same and will send the response back to you in a mobile application and everything will happen through synchronous execution.

    Thanks,
    Subra

    If this helped, please mark it as "Verified" for others facing the same issue
     

  • CU10121822-0 Profile Picture
    798 on at

    Thanks Sajeed for the response.

    I have gone through and trying to understand. What I understood like 

    Suppose i have provided the below end point to the third party application along with Client id, Secret key, Tanent id to get the authentication.

    Say 

    1. POST - 

    https://your-d365fo-url/api/services/SalesOrderServiceGroup/createSalesOrder

    2. Now the third-party application calls this API and sends the below parameters to us. For example 

    {
     customerAccount: C0001,
     itemId: IT0001,
     quantity: 10
    }

    3. Now D365FO receives the request - executes my createSalesOrder() method - creates the Sales Order. For example - Sales Order = SO-000123

    4. Now my service method returns a respons to the third party application. For example -

    {
     salesOrderNumber: SO-000123,
     status: Created
    }

    Am I correct?

    Pls advise, thanks!

     

     

  • Suggested answer
    Martin Dráb Profile Picture
    240,370 Most Valuable Professional on at

    Yes, the third-party will get such a response if you implement your custom service to return this response (and the operation won't throw an exception).

     

    By the way, this pattern of a remote procedure call (you call a service with parameters, get a return value) can also be implemented by an OData action, not just a custom service.

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders

These are the community rock stars!

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

#1
SajeedMullaji Profile Picture

SajeedMullaji 419

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 271 Super User 2026 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 271 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans