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

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)

Creating API endpoints from D365 for Finance and Operation

(0) ShareShare
ReportReport
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

  • Suggested answer
    Mea_ Profile Picture
    60,286 on at

    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

  • Matthew Ireti Profile Picture
    250 on at

    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.

  • Mea_ Profile Picture
    60,286 on at

    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
    250 on at

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

  • Matthew Ireti Profile Picture
    250 on at

    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
    250 on at

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

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

  • Mea_ Profile Picture
    60,286 on at

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

  • Matthew Ireti Profile Picture
    250 on at

    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
    60,286 on at

    So try it then.

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 August Top 10 Community Leaders

These are the community rock stars!

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans