Closed ricardopaiva closed 3 years ago
Hi! This issue concerns a production system. This repository is only for issues related to the AL compiler and developer tools of the latest developer preview environment for Dynamics 365 Business Central and we cannot guarantee a timely resolution of your issue.
We suggest that you open a support case and work with our customer support team to gather all the information necessary to fix this problem.
Please read this post on how to file an issue: https://cloudblogs.microsoft.com/dynamics365/it/2019/09/25/new-process-to-submit-support-requests-for-dynamics-365-business-central/
Describe the bug When trying to create a purchase invoice using the batch request to a OData endpoint, I get a 500 Internal Server Error. This is happening in the Sandbox and Trial Cloud Environments but not on Onprem/Sandbox on Docker environments.
To Reproduce Steps to reproduce the behavior: Please note that I'm using Postman to create the requests. (See screenshot 1)
{ "requests": [ { "method": "POST", "url": "purchaseInvoices", "headers": { "Company": "CRONUS USA, Inc.", "Content-Type": "application/json" }, "body": { "invoiceDate": "2020-05-01", "postingDate": "2020-05-01", "dueDate": "2020-05-31", "vendorInvoiceNumber": "VENDOR INV. NO. 107211", "vendorId": "dc50b2a7-7da4-ea11-bb8b-000d3a38e224", "vendorNumber": "30000", "payToVendorNumber": "30000", "purchaseInvoiceLines": [ { "sequence": 10000, "lineType": "Item", "itemId": "dc50b2a7-7da4-ea11-bb8b-000d3a38e224", "description": "ATHENS Desk (Changed description)", "unitCost": 338, "quantity": 5 } ] } } ] }
Don't forget to update the vendorId and itemId to match yours.
Besides the error, if I try to access the Business Central environment, I have an error (see screenshot 2). It seems like the request is also crashing the BC instance (and that's why I get the 500 Internal Server Error).
Expected behavior I've done the same test on V16 Onprem and Sandbox environments on Docker and the behavior was the expected. I've receive a 200 OK response and the purchase invoice was successfully inserted in BC. (See screenshot 3)
Screenshots Screenshot 1:
Screenshot 2:
Screenshot 3:
5. Versions: Business Central: Version: US Business Central 17.2 (Platform 17.0.19353.19941 + Application 17.2.19367.19525)