Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics AX (Archived)

Creating API endpoints from D365 for Finance and Operation

Posted on by 250

Good day all,

I am saddled with the responsibility of creating an endpoint in dynamics that will enable another solution provider to post some records from its own application into dynamics.

I know that i can create and expose through data entity but the format of his json values is as follows:

{
EmployeeId : “”, EmployeeNumber: “”,Surname : “”,OtherNames : “”,Email: “”,PersonalEmail: “”,Gender : “”,ManagerId : “”,Manager2Id : “”,


JobTitle: {Id: “”,Name : “"},
JobLevel: {Id: “”,Name : “"},
Department: {Id: “”,Name : “"},
Unit : {Id: “”,Name : “"},
CompanyLocation :
{Id: “”,Name : “”,
Location : {Id : “”,Name: “”}
},
BirthDay : “” // date (yyyy/mm/dd),
Phone : “”,
Address : “”,
DateHired : “” // date (yyyy/mm/dd),
ExitDate: “” // date (yyyy/mm/dd),
ExitType : “"
}

So data entity creation that will accept this kind of values is what i do not know how to do. Also I will like to know if there's a way i can expose a method just like the normal C# web API method that can assist me to be able to get this values into D365 and manipulate to suite my needs. Thanks

*This post is locked for comments

  • Mea_ Profile Picture
    Mea_ 60,278 on at
    RE: Creating API endpoints from D365 for Finance and Operation

    So try it then.

  • Matthew Ireti Profile Picture
    Matthew Ireti 250 on at
    RE: Creating API endpoints from D365 for Finance and Operation

    Nope... I use postman api tester tool... I get correct json formatted object on post alone. GET operation returned the above json response

  • Mea_ Profile Picture
    Mea_ 60,278 on at
    RE: Creating API endpoints from D365 for Finance and Operation

    Do you use this code github.com/.../JsonConsoleApplication to call it ?

  • Matthew Ireti Profile Picture
    Matthew Ireti 250 on at
    RE: Creating API endpoints from D365 for Finance and Operation

    I have written the service that I want to consume but getting  this response

    {"Parameters":[],"Return":{"Name":"return","Type":"PayrollContract"}} on a GET request

  • Matthew Ireti Profile Picture
    Matthew Ireti 250 on at
    RE: Creating API endpoints from D365 for Finance and Operation

    I keep getting this response from my service endpoint

    {"Parameters":[],"Return":{"Name":"return","Type":"PayrollContract"}}

    and not the Json value am expecting what am I doing wrong

  • Matthew Ireti Profile Picture
    Matthew Ireti 250 on at
    RE: Creating API endpoints from D365 for Finance and Operation

    OK thanks lemme try what I learnt I will get back to you

  • Mea_ Profile Picture
    Mea_ 60,278 on at
    RE: Creating API endpoints from D365 for Finance and Operation

    There are examples of c sharp code to consume x++ services on GitHub, that you can easily find using your favorite search engine. Or do you need an example of x++ service? What should it do ?

  • Matthew Ireti Profile Picture
    Matthew Ireti 250 on at
    RE: Creating API endpoints from D365 for Finance and Operation

    Thanks for your response.

    Bringing the pieces together is my issue. Because no more services in ax7 and all I am seeing is the c# implementation I need the x++ aspect of this.

    A brief code could help a lot thanks.

  • Suggested answer
    Mea_ Profile Picture
    Mea_ 60,278 on at
    RE: Creating API endpoints from D365 for Finance and Operation

    Hi Matthew Ireti,

    You can create custom service that accepts whatever you want and then process this data in D365  docs.microsoft.com/.../custom-services

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,269 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,198 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans