web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

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,397 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
    60,993 Super User 2025 Season 2 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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

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

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 3,329

#2
Jainam M. Kothari Profile Picture

Jainam M. Kothari 2,250 Super User 2025 Season 2

#3
YUN ZHU Profile Picture

YUN ZHU 1,365 Super User 2025 Season 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans