Skip to main content

Notifications

Announcements

No record found.

Small and medium business | Business Central, N...
Suggested answer

Error Creating Sales Order via API: The Sales Order Entity Buffer does not exist

(1) ShareShare
ReportReport
Posted on by
Hello,
 
I encountered an issue while working with the Business Central API to create sales orders. Here's the error message I received:
 
{
    "error": {
        "code": "Internal_RecordNotFound",
        "message": "The Sales Order Entity Buffer does not exist. Identification fields and values: No.='' CorrelationId: 507cbfd9-97bf-4ff2-96eb-f29d7bbdd64c."
    }
}
 
Endpoint:
 
Minimal Payload:
{
    "customerId": "{customer-id}",
    "orderDate": "2025-01-07",
    "currencyCode": "DKK"
}
 
Observations:
I am able to retrieve existing sales orders using a GET request to the same endpoint.
However, when I make a POST request with the minimal payload shown above, I receive the Internal_RecordNotFound error.
Additionally, changes to certain fields in the UI (e.g., address updates) do not reflect in the API response, while line item changes (e.g., adding or removing items) do.
 
Questions:
What could be causing the Internal_RecordNotFound error during the POST request?
Are there additional fields required in the payload that are not specified in the documentation for this endpoint?
Why do updates to specific fields (like address) not synchronise between the UI and the API, while changes to line items do?
 
I would greatly appreciate any guidance or troubleshooting suggestions.
 
Thank you!
 
Screenshot 2024-1...
  • Suggested answer
    YUN ZHU Profile Picture
    YUN ZHU 74,280 Super User 2024 Season 2 on at
    Error Creating Sales Order via API: The Sales Order Entity Buffer does not exist
    Hi, It looks like No. Series is not set.
    I tested it briefly.
    Get
    Post
    My test endpoint:
    https://api.businesscentral.dynamics.com/v2.0/7e47da45-7f7d-448a-bd3d-1f4aa2ec8f62/Sandbox252/api/v2.0/companies(5a958ab2-3ebb-ef11-b8ec-6045bd679fc6)/salesOrders
  • Alexander Drogin Profile Picture
    Alexander Drogin 16 on at
    Error Creating Sales Order via API: The Sales Order Entity Buffer does not exist
    Sales orders API is pretty complicated, it does not actually expose the Sales Header table, but instead API requests go the the "Sales Order Entity Buffer" table, which is the one you see in the error message. This table is synched with the Sales Header back and forth on each update, and there are a few places in code where the API page calls Get or Find on the record currently being processed, which could theoretically throw this error. But the root cause of it is hard to tell without debugging. As far as I can tell, there are no other mandatory fields, and none would cause this odd error implying that the order no. is not assigned.
    All in all, this looks like a case for Microsoft support and should be considered a bug. Even if some missing value in the request or a system setup is causing it, API consumer should not try to guess what went wrong, it is the server's task to give a clear error message.
    For a more immediate solution, I would try to run the debugger if this error could be reproduced in a sandbox, or attach the snapshot debugger if it happens only in production.
     
    As for the last question regarding out-of-synch fields, I would guess that this could happen if you use background posting and the order is queued for posting.
     
  • gdrenteria Profile Picture
    gdrenteria 12,801 Most Valuable Professional on at
    Error Creating Sales Order via API: The Sales Order Entity Buffer does not exist

    Hi, good day
    I hope this can help you, and give you some hints.

    Extending standard APIs (2) – Kauffmann @ Dynamics 365 Business Central

     

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

Congratulations 2024 Spotlight Stars!

Kudos to all of our 2024 community stars!

Meet the Top 10 leaders for December!

Congratulations to our December super stars!

Get Started Blogging in the Community

Hosted or syndicated blogging is available! ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

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

#2
Martin Dráb Profile Picture

Martin Dráb 230,579 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans