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 :
Small and medium business | Business Central, N...
Suggested Answer

Sales OrderDate is not what I send with SalesOrder API

(0) ShareShare
ReportReport
Posted on by 10

Hello Community, 

I create a salesorder using API. Here is the JSON that I send to API: 

{
    "customerId": "a4df5dc2-*******-******-002248ad8355",
    "currencyCode": "USD",
    "orderDate": "2022-01-01",
    "salesOrderLines": [
        {
            "description": "SDChargeFee",
            "quantity": 1,
            "lineType": "Item"
        }
    ]
}
But, when I open business central sales order page, the OrderDate is set to today's date. This is not what I expect. Because the items that I defined in business central have various pricings based on the date. Because the salesOrder date is not set correctly, the price that business central picks for the item is not as expected. So, the question is why the salesOrder date is not what I put in API? is this a bug?
Thanks in advance, 
I have the same question (0)
  • Suggested answer
    DAnny3211 Profile Picture
    11,407 Super User 2026 Season 1 on at

    hi

    my advice is to create a page on custom staging tables Header and Rows and expose it as an API page

    on the onafter insert of the header and rows give all the controls you need and then if everything is successful create the order in AL COde.

    Daniele

  • Suggested answer
    Mohana Yadav Profile Picture
    61,186 Super User 2026 Season 1 on at

    The orderDate is mapped to the "Document Date" field of the BC Sales Header.

    Your date 2022-01-01 should be in Document Date field in the BC.

    pastedimage1672759991975v1.png

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Congratulations to our 2025 Community Spotlights

Thanks to all of our 2025 Community Spotlight stars!

Leaderboard > Small and medium business | Business Central, NAV, RMS

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 1,857 Super User 2026 Season 1

#2
YUN ZHU Profile Picture

YUN ZHU 1,047 Super User 2026 Season 1

#3
Dhiren Nagar Profile Picture

Dhiren Nagar 959 Super User 2026 Season 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans