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, ...
Suggested Answer

D365FO : Custom API's output in JSON format issue

(0) ShareShare
ReportReport
Posted on by

Hello Experts,

 

Product : D365 finance and operation.

We have created one custom API and for that output is in JSON format. 

Question : Is there any possible way to make KEY value dynamic?

currently output is coming as below screen shot.

pastedimage1596707453239v1.png

I want to make marked field dynamic. It is User ID. And desired output is as below screen shot.

pastedimage1596707508360v2.png

Thanks in advance.

I have the same question (0)
  • Suggested answer
    nmaenpaa Profile Picture
    101,160 Moderator on at

    No, I don't think that it's possible.

    And it would not make much sense. The field names should stay, and field values should be dynamic, reflecting the data of that you are passing.

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

    Hi Chintan AX,

    Service output is based on contract structure and you can't change it in run-time. So I would say that it's not possible to change the key name dynamically. But you can always utilize azure services to transform the output from D365 to the needed one.

  • Chintan AX Profile Picture
    on at

    Hi Sergei,

    Thanks for reply. Can you give us a hint about that. How can we do that with utilizing azure services?

  • Suggested answer
    nmaenpaa Profile Picture
    101,160 Moderator on at

    There could be many ways but you could for example write a simple Azure Function to replace part of the JSON string with your dynamic version. I'd say that you can use whatever tool you're most comfortable with. And most likely you can find examples by searching the web.

    This:

    "userid": "SARA",
    "userdetails":

    Should be replaced by:

    "":

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

    Hi Chintan AX,

    I would look into Azure management API as entry point and put Logic App\Azure Function between Azure API and F&O. Logic app\Azure function in the middle is responsible for request to D365 and transform response from D365.

    community.dynamics.com/.../empowering-d365-fo-service-endpoints-with-azure-api-management-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

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 646 Most Valuable Professional

#2
André Arnaud de Calavon Profile Picture

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

#3
Sohaib Cheema Profile Picture

Sohaib Cheema 285 User Group Leader

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans