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

Can't modify Document_Date field

(0) ShareShare
ReportReport
Posted on by 10

Hi,

I am developing the integration of the company management with business central via web services.

I'm having problems in creating invoices, I can't set the Document_Date field based on my requests, this field is always set with the current date.

Can someone help me?

Thanks

  • Suggested answer
    JAngle Profile Picture
    159 on at

    Have you tried it with invoiceDate instead:

    POST https://{businesscentralPrefix}/api/v1.0/companies({id})/salesInvoices

    Content-type: application/json

    {

     "id": "id-value",

     "number": "1009",

     "invoiceDate": "2015-12-31",

     "customerNumber": "GL00000008",

     "currencyCode": "GBP",

     "paymentTermsId": "3bb5b4b6-ea4c-43ca-ba1c-3b69e29a6668"

    }

  • Alberto P. Profile Picture
    10 on at

    Hi,

    I use the v2.0 web service version.

    I don't see the field "invoiceDate", but there are:

    Document_Date

    Operation_Occurred_Date

    Posting_Date

    I valorized all this fields, but only Operation_Occurred_Date is the same that I have passed, the other contain the actual date

  • Suggested answer
    Anks27 Profile Picture
    1,087 on at

    Hello,

    I have gone through your question and did same operation in my environment and find out some facts about Document Date.

    Document Date is the date of the document you are creating, that is why it's taking current date. but if you want to change the Document from Web Service, then you have to use Microsoft Web API.

    As you can see I have used the same web service which you are using, so Business Central by default adding Current Date in Document Date field.

    Doc-Date1.png

    Now, I have used Web API of Microsoft to Create Invoice, In which they have provided one property called Invoice Date, It will change both Document and Posting Date.

    Below is the example.

    Postman Call:

    Doc-Date2.png

    Response:

    Doc-Date3.png

    Doc-Date4.png

    Doc-Date5.png

    Signed, Sealed and Delivered.

    Don't forget to help the community by Verifying the answer and Like it if your question has been answered. It will let others know that the topic has verified answer.

     

    Thanks & Regards,

    Ankit Shah(MCT-Microsoft Certified Trainer || Dynamics 365/Business Development Manager)

     

    Follow/Connect 101 on below

    LinkedIn:-   https://linkedin.com/in/dynamicpower101/

    Twitter:-     https://twitter.com/Dynamicpower101

    Facebook:- https://facebook.com/DynamicPower101/

    Telegram:- https://t.me/dynamicpower101

    Medium:-   https://medium.com/dynamicpower101

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

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

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 795 Super User 2026 Season 2

#2
YUN ZHU Profile Picture

YUN ZHU 561 Super User 2026 Season 2

#3
Grigorios Mavrogeorgis Profile Picture

Grigorios Mavrogeorgis 323 Super User 2026 Season 2

Last 30 days Overall leaderboard

Featured topics

Microsoft Training Manuals

Product updates

Dynamics 365 release plans