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
So try it then.
Nope... I use postman api tester tool... I get correct json formatted object on post alone. GET operation returned the above json response
Do you use this code github.com/.../JsonConsoleApplication to call it ?
I have written the service that I want to consume but getting this response
{"Parameters":[],"Return":{"Name":"return","Type":"PayrollContract"}} on a GET request
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
OK thanks lemme try what I learnt I will get back to you
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 ?
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.
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
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.
André Arnaud de Cal... 290,867 Super User 2024 Season 2
Martin Dráb 229,173 Most Valuable Professional
nmaenpaa 101,156