I have created ODATA endpoint in 365FO which will be used by external system to insert data to D365FO.How can i acknowledge that the data has been inserted successfully into D365fO and send back the data in JSON format to the external system
Hi Murcus,
oData insert operation will return you back inserted record\records. So just check if the response itself returned 200 and parse the response to get details about the inserted records
Hi Sergei Minozhenko,
How can I parse the response to get details about the inserted records?.
Hi murcus,
that would depend a lot about your external application, so far we don't know for example which programming language you are using. But most likely for your language there are some libraries for parsing json.
That question is not anymore related to D365FO, so I suggest to find documentation, or ask in communities of that programming language.
I have given this enpoint to be used by external system to insert data into D365fo table xxx.cloud.onebox.dynamics.com/.../Service
After inserting the record in AX table,I want to fetch that record and send back to the external system as Acknowledgement of success
Yes, that was mentioned already in your original question. And Sergei told you that the response from D365 contains what you need. Once you get the response it's up to the calling application to handle the information.
lets say you re testing using postman.On Post of the endpoint you get a response in Json which looks like this
{
"@odata.context": "xxx.onebox.dynamics.com/.../$metadata
"@odata.etag": "W/\"JzEsNKZzNzIwMjMykic=\"",
"PaymReference": "Paym-0054-596",
"Amount": 20000,
"ChequeNo": "900",
"ReceiptNo": "009",
"MainAccountNum": "3070000",
"InvoiceNo": "INV-0002",
}
how can I fetch this record send it back as a result
No need to "fetch" anything, it's given to you as a response to your OData call.
How to handle the response in your external application depends a lot about your application. But in any case it's not specific to D365.
You are making a web request in programming language x (which we don't know), and you want to capture the response and handle it. You should start by searching the web for this information. Then, if you still are unclear, try to find communities / forums for programming language x and ask your question there.
Here is the example of a response for insert operation for SalesOrigin. The external application should handle the response and react accordingly. No additional actions needed from D365 side and response is generated automatically.
HTTP/1.1 201 Created // header info // //json response { "@odata.context":"URL/data/$metadata#SalesOrderOriginCodes/$entity","@odata.etag":"W/\"JzEsNTYzNzE1MjA4MTswLDAn\"","dataAreaId":"dat","OriginCode":"Test5","OriginDescription":"test5 desc","IsOriginTypeAssigned":"No","OriginType":null }
Thanks for your response.
Assume I want to send data in JSON format to an external system how can I do it
Are you still talking about the scenario where your external service inserts data in D365FO, and you want to get the inserted data back to the external system as verification? If yes, you have been instructed above. If you still feel unsure about what to do, please share more information about your implementation.
Or are you now talking about having some new integration where D365FO sends data to your external system? If this is the case, I suggest you post a new question. Let's keep one question in one discussion.
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.
As AI tools become more common, we’re introducing a Responsible AI Use…
We are honored to recognize Abhilash Warrier as our Community Spotlight honoree for…
These are the community rock stars!
Stay up to date on forum activity by subscribing.
CA Neeraj Kumar 2,167
André Arnaud de Cal... 867 Super User 2025 Season 2
Sohaib Cheema 617 User Group Leader